| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831 |
- // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
- // Exceptions. See /LICENSE for license information.
- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- //
- // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon
- // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
- // EXTRA-ARGS: --dump-sem-ir-ranges=if-present
- //
- // AUTOUPDATE
- // TIP: To test this file alone, run:
- // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/impl/import_generic.carbon
- // TIP: To dump output, run:
- // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/import_generic.carbon
- // --- import_generic.carbon
- library "[[@TEST_NAME]]";
- class C {}
- interface I(T:! type) {}
- // Has both declaration and definition.
- impl forall [T:! type] C as I(T);
- impl forall [T:! type] C as I(T) {}
- // Only has definition.
- impl forall [T:! type] C as I(T*) {}
- // --- fail_import_generic.impl.carbon
- impl library "[[@TEST_NAME]]";
- // CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
- // CHECK:STDERR: impl forall [T:! type] C as I(T);
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- impl forall [T:! type] C as I(T);
- // CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
- // CHECK:STDERR: impl forall [T:! type] C as I(T) {}
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- impl forall [T:! type] C as I(T) {}
- // CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
- // CHECK:STDERR: impl forall [T:! type] C as I(T*);
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- impl forall [T:! type] C as I(T*);
- // CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
- // CHECK:STDERR: impl forall [T:! type] C as I(T*) {}
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- impl forall [T:! type] C as I(T*) {}
- // --- fail_import_generic_decl.carbon
- library "[[@TEST_NAME]]";
- class D {}
- interface J(T:! type) {}
- // CHECK:STDERR: fail_import_generic_decl.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition]
- // CHECK:STDERR: impl forall [T:! type] D as J(T);
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- impl forall [T:! type] D as J(T);
- // CHECK:STDERR: fail_import_generic_decl.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition]
- // CHECK:STDERR: impl forall [T:! type] D as J(T*);
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- impl forall [T:! type] D as J(T*);
- // --- fail_import_generic_decl.impl.carbon
- impl library "[[@TEST_NAME]]";
- // CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
- // CHECK:STDERR: impl forall [T:! type] D as J(T);
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- impl forall [T:! type] D as J(T);
- // CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
- // CHECK:STDERR: impl forall [T:! type] D as J(T) {}
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- impl forall [T:! type] D as J(T) {}
- // CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
- // CHECK:STDERR: impl forall [T:! type] D as J(T*);
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- impl forall [T:! type] D as J(T*);
- // CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
- // CHECK:STDERR: impl forall [T:! type] D as J(T*) {}
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- impl forall [T:! type] D as J(T*) {}
- // CHECK:STDOUT: --- import_generic.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %C: type = class_type @C [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [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: type = pattern_type type [concrete]
- // CHECK:STDOUT: %I.type.dac: type = generic_interface_type @I [concrete]
- // CHECK:STDOUT: %I.generic: %I.type.dac = struct_value () [concrete]
- // CHECK:STDOUT: %I.type.070: type = facet_type <@I, @I(%T)> [symbolic]
- // CHECK:STDOUT: %Self.269: %I.type.070 = symbolic_binding Self, 1 [symbolic]
- // CHECK:STDOUT: %I.impl_witness.f13: <witness> = impl_witness file.%I.impl_witness_table.loc8, @C.as.I.impl.f3e(%T) [symbolic]
- // CHECK:STDOUT: %require_complete.c94: <witness> = require_complete_type %I.type.070 [symbolic]
- // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic]
- // CHECK:STDOUT: %I.type.229: type = facet_type <@I, @I(%ptr)> [symbolic]
- // CHECK:STDOUT: %Self.6d0: %I.type.229 = symbolic_binding Self, 1 [symbolic]
- // CHECK:STDOUT: %require_complete.555: <witness> = require_complete_type %I.type.229 [symbolic]
- // CHECK:STDOUT: %I.impl_witness.a0f: <witness> = impl_witness file.%I.impl_witness_table.loc12, @C.as.I.impl.1fd(%T) [symbolic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .C = %C.decl
- // CHECK:STDOUT: .I = %I.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
- // CHECK:STDOUT: %I.decl: %I.type.dac = interface_decl @I [concrete = constants.%I.generic] {
- // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc5_13.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: impl_decl @C.as.I.impl.f3e [concrete] {
- // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [concrete = constants.%C]
- // CHECK:STDOUT: %I.ref.loc8: %I.type.dac = name_ref I, file.%I.decl [concrete = constants.%I.generic]
- // CHECK:STDOUT: %T.ref.loc8: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)]
- // CHECK:STDOUT: %I.type.loc8_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.070)]
- // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %I.impl_witness_table.loc8 = impl_witness_table (), @C.as.I.impl.f3e [concrete]
- // CHECK:STDOUT: %I.impl_witness.loc8: <witness> = impl_witness %I.impl_witness_table.loc8, @C.as.I.impl.f3e(constants.%T) [symbolic = @C.as.I.impl.f3e.%I.impl_witness (constants.%I.impl_witness.f13)]
- // CHECK:STDOUT: impl_decl @C.as.I.impl.f3e [concrete] {
- // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %C.ref.loc9: type = name_ref C, file.%C.decl [concrete = constants.%C]
- // CHECK:STDOUT: %I.ref.loc9: %I.type.dac = name_ref I, file.%I.decl [concrete = constants.%I.generic]
- // CHECK:STDOUT: %T.ref.loc9: type = name_ref T, %T.loc9 [symbolic = %T.loc8_14.2 (constants.%T)]
- // CHECK:STDOUT: %I.type.loc9: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.070)]
- // CHECK:STDOUT: %.Self.1: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc9: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: impl_decl @C.as.I.impl.1fd [concrete] {
- // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
- // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, file.%I.decl [concrete = constants.%I.generic]
- // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc12_14.1 [symbolic = %T.loc12_14.2 (constants.%T)]
- // CHECK:STDOUT: %ptr.loc12_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc12_32.2 (constants.%ptr)]
- // CHECK:STDOUT: %I.type.loc12_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc12_33.2 (constants.%I.type.229)]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc12_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc12_14.2 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %I.impl_witness_table.loc12 = impl_witness_table (), @C.as.I.impl.1fd [concrete]
- // CHECK:STDOUT: %I.impl_witness.loc12: <witness> = impl_witness %I.impl_witness_table.loc12, @C.as.I.impl.1fd(constants.%T) [symbolic = @C.as.I.impl.1fd.%I.impl_witness (constants.%I.impl_witness.a0f)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic interface @I(%T.loc5_13.2: type) {
- // CHECK:STDOUT: %T.loc5_13.1: type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc5_13.1)> [symbolic = %I.type (constants.%I.type.070)]
- // CHECK:STDOUT: %Self.loc5_23.2: @I.%I.type (%I.type.070) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.269)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface {
- // CHECK:STDOUT: %Self.loc5_23.1: @I.%I.type (%I.type.070) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.269)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self.loc5_23.1
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @C.as.I.impl.f3e(%T.loc8_14.1: type) {
- // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
- // CHECK:STDOUT: %I.type.loc8_32.2: type = facet_type <@I, @I(%T.loc8_14.2)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.070)]
- // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness file.%I.impl_witness_table.loc8, @C.as.I.impl.f3e(%T.loc8_14.2) [symbolic = %I.impl_witness (constants.%I.impl_witness.f13)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type.loc8_32.2 [symbolic = %require_complete (constants.%require_complete.c94)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: %C.ref.loc8 as %I.type.loc8_32.1 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = file.%I.impl_witness.loc8
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @C.as.I.impl.1fd(%T.loc12_14.1: type) {
- // CHECK:STDOUT: %T.loc12_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc12_14.2 (constants.%T)]
- // CHECK:STDOUT: %ptr.loc12_32.2: type = ptr_type %T.loc12_14.2 [symbolic = %ptr.loc12_32.2 (constants.%ptr)]
- // CHECK:STDOUT: %I.type.loc12_33.2: type = facet_type <@I, @I(%ptr.loc12_32.2)> [symbolic = %I.type.loc12_33.2 (constants.%I.type.229)]
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type.loc12_33.2 [symbolic = %require_complete (constants.%require_complete.555)]
- // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness file.%I.impl_witness_table.loc12, @C.as.I.impl.1fd(%T.loc12_14.2) [symbolic = %I.impl_witness (constants.%I.impl_witness.a0f)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: %C.ref as %I.type.loc12_33.1 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = file.%I.impl_witness.loc12
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // 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
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I(constants.%T) {
- // CHECK:STDOUT: %T.loc5_13.1 => constants.%T
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %I.type => constants.%I.type.070
- // CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.269
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @C.as.I.impl.f3e(constants.%T) {
- // CHECK:STDOUT: %T.loc8_14.2 => constants.%T
- // CHECK:STDOUT: %I.type.loc8_32.2 => constants.%I.type.070
- // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.f13
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I(constants.%ptr) {
- // CHECK:STDOUT: %T.loc5_13.1 => constants.%ptr
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %I.type => constants.%I.type.229
- // CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.6d0
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @C.as.I.impl.1fd(constants.%T) {
- // CHECK:STDOUT: %T.loc12_14.2 => constants.%T
- // CHECK:STDOUT: %ptr.loc12_32.2 => constants.%ptr
- // CHECK:STDOUT: %I.type.loc12_33.2 => constants.%I.type.229
- // CHECK:STDOUT: %require_complete => constants.%require_complete.555
- // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.a0f
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_import_generic.impl.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
- // CHECK:STDOUT: %I.type.dac: type = generic_interface_type @I [concrete]
- // CHECK:STDOUT: %I.generic: %I.type.dac = struct_value () [concrete]
- // CHECK:STDOUT: %I.type.070: type = facet_type <@I, @I(%T)> [symbolic]
- // CHECK:STDOUT: %Self.269: %I.type.070 = symbolic_binding Self, 1 [symbolic]
- // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
- // CHECK:STDOUT: %C: type = class_type @C [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %I.impl_witness.f13: <witness> = impl_witness imports.%I.impl_witness_table.478, @C.as.I.impl.f3ed6b.1(%T) [symbolic]
- // CHECK:STDOUT: %require_complete.c94: <witness> = require_complete_type %I.type.070 [symbolic]
- // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic]
- // CHECK:STDOUT: %I.type.229: type = facet_type <@I, @I(%ptr)> [symbolic]
- // CHECK:STDOUT: %require_complete.555: <witness> = require_complete_type %I.type.229 [symbolic]
- // CHECK:STDOUT: %I.impl_witness.a0f: <witness> = impl_witness imports.%I.impl_witness_table.af9, @C.as.I.impl.1fddff.1(%T) [symbolic]
- // CHECK:STDOUT: %Self.6d0: %I.type.229 = symbolic_binding Self, 1 [symbolic]
- // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Main.C: type = import_ref Main//import_generic, C, loaded [concrete = constants.%C]
- // CHECK:STDOUT: %Main.I: %I.type.dac = import_ref Main//import_generic, I, loaded [concrete = constants.%I.generic]
- // CHECK:STDOUT: %Main.import_ref.efcd44.1: type = import_ref Main//import_generic, loc5_13, loaded [symbolic = @I.%T (constants.%T)]
- // CHECK:STDOUT: %Main.import_ref.769 = import_ref Main//import_generic, loc5_23, unloaded
- // CHECK:STDOUT: %Main.import_ref.e46 = import_ref Main//import_generic, loc8_33, unloaded
- // CHECK:STDOUT: %Main.import_ref.8f2: <witness> = import_ref Main//import_generic, loc4_10, loaded [concrete = constants.%complete_type]
- // CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//import_generic, inst{{[0-9A-F]+}} [no loc], unloaded
- // CHECK:STDOUT: %Main.import_ref.efcd44.2: type = import_ref Main//import_generic, loc8_14, loaded [symbolic = @C.as.I.impl.f3ed6b.1.%T (constants.%T)]
- // CHECK:STDOUT: %Main.import_ref.29aca8.1: type = import_ref Main//import_generic, loc8_24, loaded [concrete = constants.%C]
- // CHECK:STDOUT: %Main.import_ref.464: type = import_ref Main//import_generic, loc8_32, loaded [symbolic = @C.as.I.impl.f3ed6b.1.%I.type (constants.%I.type.070)]
- // CHECK:STDOUT: %I.impl_witness_table.478 = impl_witness_table (), @C.as.I.impl.f3ed6b.1 [concrete]
- // CHECK:STDOUT: %Main.import_ref.4f8 = import_ref Main//import_generic, loc12_35, unloaded
- // CHECK:STDOUT: %Main.import_ref.efcd44.3: type = import_ref Main//import_generic, loc12_14, loaded [symbolic = @C.as.I.impl.1fddff.1.%T (constants.%T)]
- // CHECK:STDOUT: %Main.import_ref.29aca8.2: type = import_ref Main//import_generic, loc12_24, loaded [concrete = constants.%C]
- // CHECK:STDOUT: %Main.import_ref.7b6: type = import_ref Main//import_generic, loc12_33, loaded [symbolic = @C.as.I.impl.1fddff.1.%I.type (constants.%I.type.229)]
- // CHECK:STDOUT: %I.impl_witness_table.af9 = impl_witness_table (), @C.as.I.impl.1fddff.1 [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .C = imports.%Main.C
- // CHECK:STDOUT: .I = imports.%Main.I
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import.loc2_30.1 = import <none>
- // CHECK:STDOUT: %default.import.loc2_30.2 = import <none>
- // CHECK:STDOUT: impl_decl @C.as.I.impl.f3ed6b.2 [concrete] {
- // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
- // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, imports.%Main.I [concrete = constants.%I.generic]
- // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)]
- // CHECK:STDOUT: %I.type.loc8_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.070)]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: impl_decl @C.as.I.impl.f3ed6b.3 [concrete] {
- // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
- // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, imports.%Main.I [concrete = constants.%I.generic]
- // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_14.1 [symbolic = %T.loc14_14.2 (constants.%T)]
- // CHECK:STDOUT: %I.type.loc14_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc14_32.2 (constants.%I.type.070)]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc14_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc14_14.2 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: impl_decl @C.as.I.impl.1fddff.2 [concrete] {
- // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
- // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, imports.%Main.I [concrete = constants.%I.generic]
- // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc20_14.1 [symbolic = %T.loc20_14.2 (constants.%T)]
- // CHECK:STDOUT: %ptr.loc20_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc20_32.2 (constants.%ptr)]
- // CHECK:STDOUT: %I.type.loc20_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc20_33.2 (constants.%I.type.229)]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc20_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc20_14.2 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: impl_decl @C.as.I.impl.1fddff.3 [concrete] {
- // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
- // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, imports.%Main.I [concrete = constants.%I.generic]
- // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc26_14.1 [symbolic = %T.loc26_14.2 (constants.%T)]
- // CHECK:STDOUT: %ptr.loc26_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc26_32.2 (constants.%ptr)]
- // CHECK:STDOUT: %I.type.loc26_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc26_33.2 (constants.%I.type.229)]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc26_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc26_14.2 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.efcd44.1: type) [from "import_generic.carbon"] {
- // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.070)]
- // CHECK:STDOUT: %Self: @I.%I.type (%I.type.070) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.269)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%Main.import_ref.769
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @C.as.I.impl.f3ed6b.1(imports.%Main.import_ref.efcd44.2: type) [from "import_generic.carbon"] {
- // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.070)]
- // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness imports.%I.impl_witness_table.478, @C.as.I.impl.f3ed6b.1(%T) [symbolic = %I.impl_witness (constants.%I.impl_witness.f13)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete.c94)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%Main.import_ref.29aca8.1 as imports.%Main.import_ref.464 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%Main.import_ref.e46
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @C.as.I.impl.1fddff.1(imports.%Main.import_ref.efcd44.3: type) [from "import_generic.carbon"] {
- // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic = %ptr (constants.%ptr)]
- // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%ptr)> [symbolic = %I.type (constants.%I.type.229)]
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete.555)]
- // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness imports.%I.impl_witness_table.af9, @C.as.I.impl.1fddff.1(%T) [symbolic = %I.impl_witness (constants.%I.impl_witness.a0f)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%Main.import_ref.29aca8.2 as imports.%Main.import_ref.7b6 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = imports.%Main.import_ref.4f8
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @C.as.I.impl.f3ed6b.2(%T.loc8_14.1: type) {
- // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
- // CHECK:STDOUT: %I.type.loc8_32.2: type = facet_type <@I, @I(%T.loc8_14.2)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.070)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: %C.ref as %I.type.loc8_32.1;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @C.as.I.impl.f3ed6b.3(%T.loc14_14.1: type) {
- // CHECK:STDOUT: %T.loc14_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc14_14.2 (constants.%T)]
- // CHECK:STDOUT: %I.type.loc14_32.2: type = facet_type <@I, @I(%T.loc14_14.2)> [symbolic = %I.type.loc14_32.2 (constants.%I.type.070)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: %C.ref as %I.type.loc14_32.1 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = <error>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @C.as.I.impl.1fddff.2(%T.loc20_14.1: type) {
- // CHECK:STDOUT: %T.loc20_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc20_14.2 (constants.%T)]
- // CHECK:STDOUT: %ptr.loc20_32.2: type = ptr_type %T.loc20_14.2 [symbolic = %ptr.loc20_32.2 (constants.%ptr)]
- // CHECK:STDOUT: %I.type.loc20_33.2: type = facet_type <@I, @I(%ptr.loc20_32.2)> [symbolic = %I.type.loc20_33.2 (constants.%I.type.229)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: %C.ref as %I.type.loc20_33.1;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @C.as.I.impl.1fddff.3(%T.loc26_14.1: type) {
- // CHECK:STDOUT: %T.loc26_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc26_14.2 (constants.%T)]
- // CHECK:STDOUT: %ptr.loc26_32.2: type = ptr_type %T.loc26_14.2 [symbolic = %ptr.loc26_32.2 (constants.%ptr)]
- // CHECK:STDOUT: %I.type.loc26_33.2: type = facet_type <@I, @I(%ptr.loc26_32.2)> [symbolic = %I.type.loc26_33.2 (constants.%I.type.229)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: %C.ref as %I.type.loc26_33.1 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = <error>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C [from "import_generic.carbon"] {
- // CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f2
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%Main.import_ref.2c4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I(constants.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %I.type => constants.%I.type.070
- // CHECK:STDOUT: %Self => constants.%Self.269
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @C.as.I.impl.f3ed6b.1(constants.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %I.type => constants.%I.type.070
- // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.f13
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I(constants.%ptr) {
- // CHECK:STDOUT: %T => constants.%ptr
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %I.type => constants.%I.type.229
- // CHECK:STDOUT: %Self => constants.%Self.6d0
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @C.as.I.impl.1fddff.1(constants.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %ptr => constants.%ptr
- // CHECK:STDOUT: %I.type => constants.%I.type.229
- // CHECK:STDOUT: %require_complete => constants.%require_complete.555
- // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.a0f
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @C.as.I.impl.f3ed6b.2(constants.%T) {
- // CHECK:STDOUT: %T.loc8_14.2 => constants.%T
- // CHECK:STDOUT: %I.type.loc8_32.2 => constants.%I.type.070
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @C.as.I.impl.f3ed6b.3(constants.%T) {
- // CHECK:STDOUT: %T.loc14_14.2 => constants.%T
- // CHECK:STDOUT: %I.type.loc14_32.2 => constants.%I.type.070
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @C.as.I.impl.1fddff.2(constants.%T) {
- // CHECK:STDOUT: %T.loc20_14.2 => constants.%T
- // CHECK:STDOUT: %ptr.loc20_32.2 => constants.%ptr
- // CHECK:STDOUT: %I.type.loc20_33.2 => constants.%I.type.229
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @C.as.I.impl.1fddff.3(constants.%T) {
- // CHECK:STDOUT: %T.loc26_14.2 => constants.%T
- // CHECK:STDOUT: %ptr.loc26_32.2 => constants.%ptr
- // CHECK:STDOUT: %I.type.loc26_33.2 => constants.%I.type.229
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_import_generic_decl.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %D: type = class_type @D [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [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: type = pattern_type type [concrete]
- // CHECK:STDOUT: %J.type.2b8: type = generic_interface_type @J [concrete]
- // CHECK:STDOUT: %J.generic: %J.type.2b8 = struct_value () [concrete]
- // CHECK:STDOUT: %J.type.8ec: type = facet_type <@J, @J(%T)> [symbolic]
- // CHECK:STDOUT: %Self: %J.type.8ec = symbolic_binding Self, 1 [symbolic]
- // CHECK:STDOUT: %J.impl_witness.224: <witness> = impl_witness file.%J.impl_witness_table.loc11, @D.as.J.impl.b47(%T) [symbolic]
- // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic]
- // CHECK:STDOUT: %J.type.4fa: type = facet_type <@J, @J(%ptr)> [symbolic]
- // CHECK:STDOUT: %J.impl_witness.537: <witness> = impl_witness file.%J.impl_witness_table.loc17, @D.as.J.impl.265(%T) [symbolic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .D = %D.decl
- // CHECK:STDOUT: .J = %J.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {}
- // CHECK:STDOUT: %J.decl: %J.type.2b8 = interface_decl @J [concrete = constants.%J.generic] {
- // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc5_13.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: impl_decl @D.as.J.impl.b47 [concrete] {
- // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
- // CHECK:STDOUT: %J.ref: %J.type.2b8 = name_ref J, file.%J.decl [concrete = constants.%J.generic]
- // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_14.1 [symbolic = %T.loc11_14.2 (constants.%T)]
- // CHECK:STDOUT: %J.type.loc11_32.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc11_32.2 (constants.%J.type.8ec)]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc11_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc11_14.2 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %J.impl_witness_table.loc11 = impl_witness_table (), @D.as.J.impl.b47 [concrete]
- // CHECK:STDOUT: %J.impl_witness.loc11: <witness> = impl_witness %J.impl_witness_table.loc11, @D.as.J.impl.b47(constants.%T) [symbolic = @D.as.J.impl.b47.%J.impl_witness (constants.%J.impl_witness.224)]
- // CHECK:STDOUT: impl_decl @D.as.J.impl.265 [concrete] {
- // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
- // CHECK:STDOUT: %J.ref: %J.type.2b8 = name_ref J, file.%J.decl [concrete = constants.%J.generic]
- // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc17_14.1 [symbolic = %T.loc17_14.2 (constants.%T)]
- // CHECK:STDOUT: %ptr.loc17_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc17_32.2 (constants.%ptr)]
- // CHECK:STDOUT: %J.type.loc17_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc17_33.2 (constants.%J.type.4fa)]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc17_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc17_14.2 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %J.impl_witness_table.loc17 = impl_witness_table (), @D.as.J.impl.265 [concrete]
- // CHECK:STDOUT: %J.impl_witness.loc17: <witness> = impl_witness %J.impl_witness_table.loc17, @D.as.J.impl.265(constants.%T) [symbolic = @D.as.J.impl.265.%J.impl_witness (constants.%J.impl_witness.537)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic interface @J(%T.loc5_13.2: type) {
- // CHECK:STDOUT: %T.loc5_13.1: type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T.loc5_13.1)> [symbolic = %J.type (constants.%J.type.8ec)]
- // CHECK:STDOUT: %Self.loc5_23.2: @J.%J.type (%J.type.8ec) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface {
- // CHECK:STDOUT: %Self.loc5_23.1: @J.%J.type (%J.type.8ec) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self.loc5_23.1
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @D.as.J.impl.b47(%T.loc11_14.1: type) {
- // CHECK:STDOUT: %T.loc11_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc11_14.2 (constants.%T)]
- // CHECK:STDOUT: %J.type.loc11_32.2: type = facet_type <@J, @J(%T.loc11_14.2)> [symbolic = %J.type.loc11_32.2 (constants.%J.type.8ec)]
- // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness file.%J.impl_witness_table.loc11, @D.as.J.impl.b47(%T.loc11_14.2) [symbolic = %J.impl_witness (constants.%J.impl_witness.224)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: %D.ref as %J.type.loc11_32.1;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @D.as.J.impl.265(%T.loc17_14.1: type) {
- // CHECK:STDOUT: %T.loc17_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc17_14.2 (constants.%T)]
- // CHECK:STDOUT: %ptr.loc17_32.2: type = ptr_type %T.loc17_14.2 [symbolic = %ptr.loc17_32.2 (constants.%ptr)]
- // CHECK:STDOUT: %J.type.loc17_33.2: type = facet_type <@J, @J(%ptr.loc17_32.2)> [symbolic = %J.type.loc17_33.2 (constants.%J.type.4fa)]
- // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness file.%J.impl_witness_table.loc17, @D.as.J.impl.265(%T.loc17_14.2) [symbolic = %J.impl_witness (constants.%J.impl_witness.537)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: %D.ref as %J.type.loc17_33.1;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @D {
- // 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.%D
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @J(constants.%T) {
- // CHECK:STDOUT: %T.loc5_13.1 => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @D.as.J.impl.b47(constants.%T) {
- // CHECK:STDOUT: %T.loc11_14.2 => constants.%T
- // CHECK:STDOUT: %J.type.loc11_32.2 => constants.%J.type.8ec
- // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.224
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @J(constants.%ptr) {
- // CHECK:STDOUT: %T.loc5_13.1 => constants.%ptr
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @D.as.J.impl.265(constants.%T) {
- // CHECK:STDOUT: %T.loc17_14.2 => constants.%T
- // CHECK:STDOUT: %ptr.loc17_32.2 => constants.%ptr
- // CHECK:STDOUT: %J.type.loc17_33.2 => constants.%J.type.4fa
- // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.537
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_import_generic_decl.impl.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
- // CHECK:STDOUT: %J.type.2b8: type = generic_interface_type @J [concrete]
- // CHECK:STDOUT: %J.generic: %J.type.2b8 = struct_value () [concrete]
- // CHECK:STDOUT: %J.type.8ec: type = facet_type <@J, @J(%T)> [symbolic]
- // CHECK:STDOUT: %Self: %J.type.8ec = symbolic_binding Self, 1 [symbolic]
- // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
- // CHECK:STDOUT: %D: type = class_type @D [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %J.impl_witness.224: <witness> = impl_witness imports.%J.impl_witness_table.bc9, @D.as.J.impl.b470bf.1(%T) [symbolic]
- // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic]
- // CHECK:STDOUT: %J.type.4fa: type = facet_type <@J, @J(%ptr)> [symbolic]
- // CHECK:STDOUT: %J.impl_witness.537: <witness> = impl_witness imports.%J.impl_witness_table.bd9, @D.as.J.impl.265db6.1(%T) [symbolic]
- // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Main.D: type = import_ref Main//import_generic_decl, D, loaded [concrete = constants.%D]
- // CHECK:STDOUT: %Main.J: %J.type.2b8 = import_ref Main//import_generic_decl, J, loaded [concrete = constants.%J.generic]
- // CHECK:STDOUT: %Main.import_ref.efcd44.1: type = import_ref Main//import_generic_decl, loc5_13, loaded [symbolic = @J.%T (constants.%T)]
- // CHECK:STDOUT: %Main.import_ref.b3b = import_ref Main//import_generic_decl, loc5_23, unloaded
- // CHECK:STDOUT: %Main.import_ref.8f2: <witness> = import_ref Main//import_generic_decl, loc4_10, loaded [concrete = constants.%complete_type]
- // CHECK:STDOUT: %Main.import_ref.cab = import_ref Main//import_generic_decl, inst{{[0-9A-F]+}} [no loc], unloaded
- // CHECK:STDOUT: %Main.import_ref.efcd44.2: type = import_ref Main//import_generic_decl, loc11_14, loaded [symbolic = @D.as.J.impl.b470bf.1.%T (constants.%T)]
- // CHECK:STDOUT: %Main.import_ref.aa9f8a.1: type = import_ref Main//import_generic_decl, loc11_24, loaded [concrete = constants.%D]
- // CHECK:STDOUT: %Main.import_ref.03f: type = import_ref Main//import_generic_decl, loc11_32, loaded [symbolic = @D.as.J.impl.b470bf.1.%J.type (constants.%J.type.8ec)]
- // CHECK:STDOUT: %J.impl_witness_table.bc9 = impl_witness_table (), @D.as.J.impl.b470bf.1 [concrete]
- // CHECK:STDOUT: %Main.import_ref.efcd44.3: type = import_ref Main//import_generic_decl, loc17_14, loaded [symbolic = @D.as.J.impl.265db6.1.%T (constants.%T)]
- // CHECK:STDOUT: %Main.import_ref.aa9f8a.2: type = import_ref Main//import_generic_decl, loc17_24, loaded [concrete = constants.%D]
- // CHECK:STDOUT: %Main.import_ref.a00: type = import_ref Main//import_generic_decl, loc17_33, loaded [symbolic = @D.as.J.impl.265db6.1.%J.type (constants.%J.type.4fa)]
- // CHECK:STDOUT: %J.impl_witness_table.bd9 = impl_witness_table (), @D.as.J.impl.265db6.1 [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .D = imports.%Main.D
- // CHECK:STDOUT: .J = imports.%Main.J
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import.loc2_35.1 = import <none>
- // CHECK:STDOUT: %default.import.loc2_35.2 = import <none>
- // CHECK:STDOUT: impl_decl @D.as.J.impl.b470bf.2 [concrete] {
- // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D]
- // CHECK:STDOUT: %J.ref: %J.type.2b8 = name_ref J, imports.%Main.J [concrete = constants.%J.generic]
- // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)]
- // CHECK:STDOUT: %J.type.loc8_32.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc8_32.2 (constants.%J.type.8ec)]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: impl_decl @D.as.J.impl.b470bf.3 [concrete] {
- // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D]
- // CHECK:STDOUT: %J.ref: %J.type.2b8 = name_ref J, imports.%Main.J [concrete = constants.%J.generic]
- // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_14.1 [symbolic = %T.loc14_14.2 (constants.%T)]
- // CHECK:STDOUT: %J.type.loc14_32.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc14_32.2 (constants.%J.type.8ec)]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc14_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc14_14.2 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: impl_decl @D.as.J.impl.265db6.2 [concrete] {
- // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D]
- // CHECK:STDOUT: %J.ref: %J.type.2b8 = name_ref J, imports.%Main.J [concrete = constants.%J.generic]
- // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc20_14.1 [symbolic = %T.loc20_14.2 (constants.%T)]
- // CHECK:STDOUT: %ptr.loc20_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc20_32.2 (constants.%ptr)]
- // CHECK:STDOUT: %J.type.loc20_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc20_33.2 (constants.%J.type.4fa)]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc20_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc20_14.2 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: impl_decl @D.as.J.impl.265db6.3 [concrete] {
- // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D]
- // CHECK:STDOUT: %J.ref: %J.type.2b8 = name_ref J, imports.%Main.J [concrete = constants.%J.generic]
- // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc26_14.1 [symbolic = %T.loc26_14.2 (constants.%T)]
- // CHECK:STDOUT: %ptr.loc26_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc26_32.2 (constants.%ptr)]
- // CHECK:STDOUT: %J.type.loc26_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc26_33.2 (constants.%J.type.4fa)]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc26_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc26_14.2 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic interface @J(imports.%Main.import_ref.efcd44.1: type) [from "fail_import_generic_decl.carbon"] {
- // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.8ec)]
- // CHECK:STDOUT: %Self: @J.%J.type (%J.type.8ec) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%Main.import_ref.b3b
- // CHECK:STDOUT: witness = ()
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @D.as.J.impl.b470bf.1(imports.%Main.import_ref.efcd44.2: type) [from "fail_import_generic_decl.carbon"] {
- // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.8ec)]
- // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness imports.%J.impl_witness_table.bc9, @D.as.J.impl.b470bf.1(%T) [symbolic = %J.impl_witness (constants.%J.impl_witness.224)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%Main.import_ref.aa9f8a.1 as imports.%Main.import_ref.03f;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @D.as.J.impl.265db6.1(imports.%Main.import_ref.efcd44.3: type) [from "fail_import_generic_decl.carbon"] {
- // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic = %ptr (constants.%ptr)]
- // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%ptr)> [symbolic = %J.type (constants.%J.type.4fa)]
- // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness imports.%J.impl_witness_table.bd9, @D.as.J.impl.265db6.1(%T) [symbolic = %J.impl_witness (constants.%J.impl_witness.537)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: imports.%Main.import_ref.aa9f8a.2 as imports.%Main.import_ref.a00;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @D.as.J.impl.b470bf.2(%T.loc8_14.1: type) {
- // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
- // CHECK:STDOUT: %J.type.loc8_32.2: type = facet_type <@J, @J(%T.loc8_14.2)> [symbolic = %J.type.loc8_32.2 (constants.%J.type.8ec)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: %D.ref as %J.type.loc8_32.1;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @D.as.J.impl.b470bf.3(%T.loc14_14.1: type) {
- // CHECK:STDOUT: %T.loc14_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc14_14.2 (constants.%T)]
- // CHECK:STDOUT: %J.type.loc14_32.2: type = facet_type <@J, @J(%T.loc14_14.2)> [symbolic = %J.type.loc14_32.2 (constants.%J.type.8ec)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: %D.ref as %J.type.loc14_32.1 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = <error>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @D.as.J.impl.265db6.2(%T.loc20_14.1: type) {
- // CHECK:STDOUT: %T.loc20_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc20_14.2 (constants.%T)]
- // CHECK:STDOUT: %ptr.loc20_32.2: type = ptr_type %T.loc20_14.2 [symbolic = %ptr.loc20_32.2 (constants.%ptr)]
- // CHECK:STDOUT: %J.type.loc20_33.2: type = facet_type <@J, @J(%ptr.loc20_32.2)> [symbolic = %J.type.loc20_33.2 (constants.%J.type.4fa)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: %D.ref as %J.type.loc20_33.1;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @D.as.J.impl.265db6.3(%T.loc26_14.1: type) {
- // CHECK:STDOUT: %T.loc26_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc26_14.2 (constants.%T)]
- // CHECK:STDOUT: %ptr.loc26_32.2: type = ptr_type %T.loc26_14.2 [symbolic = %ptr.loc26_32.2 (constants.%ptr)]
- // CHECK:STDOUT: %J.type.loc26_33.2: type = facet_type <@J, @J(%ptr.loc26_32.2)> [symbolic = %J.type.loc26_33.2 (constants.%J.type.4fa)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: %D.ref as %J.type.loc26_33.1 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = <error>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @D [from "fail_import_generic_decl.carbon"] {
- // CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f2
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%Main.import_ref.cab
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @J(constants.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @D.as.J.impl.b470bf.1(constants.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %J.type => constants.%J.type.8ec
- // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.224
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @J(constants.%ptr) {
- // CHECK:STDOUT: %T => constants.%ptr
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @D.as.J.impl.265db6.1(constants.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %ptr => constants.%ptr
- // CHECK:STDOUT: %J.type => constants.%J.type.4fa
- // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.537
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @D.as.J.impl.b470bf.2(constants.%T) {
- // CHECK:STDOUT: %T.loc8_14.2 => constants.%T
- // CHECK:STDOUT: %J.type.loc8_32.2 => constants.%J.type.8ec
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @D.as.J.impl.b470bf.3(constants.%T) {
- // CHECK:STDOUT: %T.loc14_14.2 => constants.%T
- // CHECK:STDOUT: %J.type.loc14_32.2 => constants.%J.type.8ec
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @D.as.J.impl.265db6.2(constants.%T) {
- // CHECK:STDOUT: %T.loc20_14.2 => constants.%T
- // CHECK:STDOUT: %ptr.loc20_32.2 => constants.%ptr
- // CHECK:STDOUT: %J.type.loc20_33.2 => constants.%J.type.4fa
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @D.as.J.impl.265db6.3(constants.%T) {
- // CHECK:STDOUT: %T.loc26_14.2 => constants.%T
- // CHECK:STDOUT: %ptr.loc26_32.2 => constants.%ptr
- // CHECK:STDOUT: %J.type.loc26_33.2 => constants.%J.type.4fa
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
|