|
|
@@ -15,28 +15,87 @@ 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*) {}
|
|
|
|
|
|
-// --- import_generic.impl.carbon
|
|
|
+// --- fail_import_generic.impl.carbon
|
|
|
|
|
|
impl library "[[@TEST_NAME]]";
|
|
|
|
|
|
-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.impl.carbon
|
|
|
+// 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) {}
|
|
|
|
|
|
-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+7]]:1: error: redefinition of `impl C as I(T*)` [ImplRedefinition]
|
|
|
-// CHECK:STDERR: impl forall [T:! type] C as I(T*) {}
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
-// CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE-5]]:6: in import [InImport]
|
|
|
-// CHECK:STDERR: import_generic.carbon:8:1: note: previous definition was here [ImplPreviousDefinition]
|
|
|
+// 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 [MissingImplDefinition]
|
|
|
+// 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 [MissingImplDefinition]
|
|
|
+// 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+3]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
|
|
|
+// CHECK:STDERR: impl forall [T:! type] D as J(T*) {}
|
|
|
+// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
+impl forall [T:! type] D as J(T*) {}
|
|
|
+
|
|
|
// CHECK:STDOUT: --- import_generic.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
@@ -49,10 +108,9 @@ impl forall [T:! type] C as I(T*) {}
|
|
|
// CHECK:STDOUT: %I.generic: %I.type.1 = struct_value () [template]
|
|
|
// CHECK:STDOUT: %I.type.2: type = facet_type <@I, @I(%T)> [symbolic]
|
|
|
// CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
|
|
+// CHECK:STDOUT: %interface: <witness> = interface_witness () [template]
|
|
|
// CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic]
|
|
|
// CHECK:STDOUT: %I.type.3: type = facet_type <@I, @I(%ptr)> [symbolic]
|
|
|
-// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type.3 [symbolic]
|
|
|
-// CHECK:STDOUT: %interface: <witness> = interface_witness () [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
@@ -69,27 +127,38 @@ impl forall [T:! type] C as I(T*) {}
|
|
|
// CHECK:STDOUT: %T.loc5_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc5_13.2 (constants.%T)]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: impl_decl @impl.1 [template] {
|
|
|
-// CHECK:STDOUT: %T.patt.loc7_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_14.2 (constants.%T.patt)]
|
|
|
-// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc7_14.1, runtime_param<invalid> [symbolic = %T.patt.loc7_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %T.patt.loc8_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc8_14.1, runtime_param<invalid> [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)]
|
|
|
// CHECK:STDOUT: } {
|
|
|
-// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
|
|
|
-// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I.generic]
|
|
|
-// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_14.1 [symbolic = %T.loc7_14.2 (constants.%T)]
|
|
|
-// CHECK:STDOUT: %I.type.loc7_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc7_32.2 (constants.%I.type.2)]
|
|
|
-// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
|
|
|
-// CHECK:STDOUT: %T.loc7_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc7_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [template = constants.%C]
|
|
|
+// CHECK:STDOUT: %I.ref.loc8: %I.type.1 = name_ref I, file.%I.decl [template = 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.2)]
|
|
|
+// CHECK:STDOUT: %T.param.loc8: type = value_param runtime_param<invalid>
|
|
|
+// CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0, %T.param.loc8 [symbolic = %T.loc8_14.2 (constants.%T)]
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: impl_decl @impl.2 [template] {
|
|
|
+// CHECK:STDOUT: impl_decl @impl.1 [template] {
|
|
|
// CHECK:STDOUT: %T.patt.loc8_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)]
|
|
|
// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc8_14.1, runtime_param<invalid> [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)]
|
|
|
// CHECK:STDOUT: } {
|
|
|
+// CHECK:STDOUT: %C.ref.loc9: type = name_ref C, file.%C.decl [template = constants.%C]
|
|
|
+// CHECK:STDOUT: %I.ref.loc9: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I.generic]
|
|
|
+// CHECK:STDOUT: %T.ref.loc9: type = name_ref T, %T.loc9 [symbolic = constants.%T]
|
|
|
+// CHECK:STDOUT: %I.type.loc9: type = facet_type <@I, @I(constants.%T)> [symbolic = constants.%I.type.2]
|
|
|
+// CHECK:STDOUT: %T.param.loc9: type = value_param runtime_param<invalid>
|
|
|
+// CHECK:STDOUT: %T.loc9: type = bind_symbolic_name T, 0, %T.param.loc9 [symbolic = constants.%T]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: impl_decl @impl.2 [template] {
|
|
|
+// CHECK:STDOUT: %T.patt.loc12_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc12_14.1, runtime_param<invalid> [symbolic = %T.patt.loc12_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: } {
|
|
|
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
|
|
|
// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I.generic]
|
|
|
-// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)]
|
|
|
-// CHECK:STDOUT: %ptr.loc8_32.1: type = ptr_type %T [symbolic = %ptr.loc8_32.2 (constants.%ptr)]
|
|
|
-// CHECK:STDOUT: %I.type.loc8_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc8_33.2 (constants.%I.type.3)]
|
|
|
+// 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 [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.3)]
|
|
|
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
|
|
|
-// CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %T.loc12_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc12_14.2 (constants.%T)]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
@@ -110,24 +179,30 @@ impl forall [T:! type] C as I(T*) {}
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic impl @impl.1(%T.loc7_14.1: type) {
|
|
|
-// CHECK:STDOUT: %T.loc7_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_14.2 (constants.%T)]
|
|
|
-// CHECK:STDOUT: %T.patt.loc7_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_14.2 (constants.%T.patt)]
|
|
|
-// CHECK:STDOUT: %I.type.loc7_32.2: type = facet_type <@I, @I(%T.loc7_14.2)> [symbolic = %I.type.loc7_32.2 (constants.%I.type.2)]
|
|
|
+// CHECK:STDOUT: generic impl @impl.1(%T.loc8_14.1: type) {
|
|
|
+// CHECK:STDOUT: %T.loc8_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %T.patt.loc8_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)]
|
|
|
+// 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.2)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: impl: %C.ref.loc8 as %I.type.loc8_32.1 {
|
|
|
+// CHECK:STDOUT: %interface: <witness> = interface_witness () [template = constants.%interface]
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: impl: %C.ref as %I.type.loc7_32.1;
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
+// CHECK:STDOUT: witness = %interface
|
|
|
+// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic impl @impl.2(%T.loc8_14.1: type) {
|
|
|
-// CHECK:STDOUT: %T.loc8_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
|
|
|
-// CHECK:STDOUT: %T.patt.loc8_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)]
|
|
|
-// CHECK:STDOUT: %ptr.loc8_32.2: type = ptr_type @impl.2.%T.loc8_14.2 (%T) [symbolic = %ptr.loc8_32.2 (constants.%ptr)]
|
|
|
-// CHECK:STDOUT: %I.type.loc8_33.2: type = facet_type <@I, @I(%ptr.loc8_32.2)> [symbolic = %I.type.loc8_33.2 (constants.%I.type.3)]
|
|
|
+// CHECK:STDOUT: generic impl @impl.2(%T.loc12_14.1: type) {
|
|
|
+// CHECK:STDOUT: %T.loc12_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc12_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %T.patt.loc12_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %ptr.loc12_32.2: type = ptr_type @impl.2.%T.loc12_14.2 (%T) [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.3)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
-// CHECK:STDOUT: %require_complete: <witness> = require_complete_type @impl.2.%I.type.loc8_33.2 (%I.type.3) [symbolic = %require_complete (constants.%require_complete)]
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: impl: %C.ref as %I.type.loc8_33.1 {
|
|
|
+// CHECK:STDOUT: impl: %C.ref as %I.type.loc12_33.1 {
|
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness () [template = constants.%interface]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !members:
|
|
|
@@ -146,16 +221,20 @@ impl forall [T:! type] C as I(T*) {}
|
|
|
// CHECK:STDOUT: specific @I(constants.%T) {
|
|
|
// CHECK:STDOUT: %T.loc5_13.2 => constants.%T
|
|
|
// CHECK:STDOUT: %T.patt.loc5_13.2 => constants.%T
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
+// CHECK:STDOUT: %I.type => constants.%I.type.2
|
|
|
+// CHECK:STDOUT: %Self.2 => constants.%Self
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @I(%T.loc5_13.2) {}
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @I(@impl.1.%T.loc7_14.2) {}
|
|
|
+// CHECK:STDOUT: specific @I(@impl.1.%T.loc8_14.2) {}
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @impl.1(constants.%T) {
|
|
|
-// CHECK:STDOUT: %T.loc7_14.2 => constants.%T
|
|
|
-// CHECK:STDOUT: %T.patt.loc7_14.2 => constants.%T
|
|
|
-// CHECK:STDOUT: %I.type.loc7_32.2 => constants.%I.type.2
|
|
|
+// CHECK:STDOUT: %T.loc8_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %I.type.loc8_32.2 => constants.%I.type.2
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @I(constants.%ptr) {
|
|
|
@@ -167,16 +246,16 @@ impl forall [T:! type] C as I(T*) {}
|
|
|
// CHECK:STDOUT: %Self.2 => constants.%Self
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @I(@impl.2.%ptr.loc8_32.2) {}
|
|
|
+// CHECK:STDOUT: specific @I(@impl.2.%ptr.loc12_32.2) {}
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @impl.2(constants.%T) {
|
|
|
-// CHECK:STDOUT: %T.loc8_14.2 => constants.%T
|
|
|
-// CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T
|
|
|
-// CHECK:STDOUT: %ptr.loc8_32.2 => constants.%ptr
|
|
|
-// CHECK:STDOUT: %I.type.loc8_33.2 => constants.%I.type.3
|
|
|
+// CHECK:STDOUT: %T.loc12_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %T.patt.loc12_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %ptr.loc12_32.2 => constants.%ptr
|
|
|
+// CHECK:STDOUT: %I.type.loc12_33.2 => constants.%I.type.3
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- import_generic.impl.carbon
|
|
|
+// CHECK:STDOUT: --- fail_import_generic.impl.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
|
|
|
@@ -190,8 +269,6 @@ impl forall [T:! type] C as I(T*) {}
|
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
|
|
|
// CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic]
|
|
|
// CHECK:STDOUT: %I.type.3: type = facet_type <@I, @I(%ptr)> [symbolic]
|
|
|
-// CHECK:STDOUT: %require_complete.1: <witness> = require_complete_type %I.type.3 [symbolic]
|
|
|
-// CHECK:STDOUT: %require_complete.2: <witness> = require_complete_type %I.type.2 [symbolic]
|
|
|
// CHECK:STDOUT: %interface: <witness> = interface_witness () [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
@@ -201,11 +278,12 @@ impl forall [T:! type] C as I(T*) {}
|
|
|
// CHECK:STDOUT: %import_ref.3 = import_ref Main//import_generic, inst31 [no loc], unloaded
|
|
|
// CHECK:STDOUT: %import_ref.4: <witness> = import_ref Main//import_generic, loc4_10, loaded [template = constants.%complete_type]
|
|
|
// CHECK:STDOUT: %import_ref.5 = import_ref Main//import_generic, inst14 [no loc], unloaded
|
|
|
-// CHECK:STDOUT: %import_ref.6: type = import_ref Main//import_generic, loc7_24, loaded [template = constants.%C]
|
|
|
-// CHECK:STDOUT: %import_ref.7: type = import_ref Main//import_generic, loc7_32, loaded [symbolic = @impl.1.%I.type.1 (constants.%I.type.2)]
|
|
|
-// CHECK:STDOUT: %import_ref.8: type = import_ref Main//import_generic, loc8_24, loaded [template = constants.%C]
|
|
|
-// CHECK:STDOUT: %import_ref.9: type = import_ref Main//import_generic, loc8_33, loaded [symbolic = @impl.2.%I.type (constants.%I.type.3)]
|
|
|
-// CHECK:STDOUT: %import_ref.10 = import_ref Main//import_generic, loc8_35, unloaded
|
|
|
+// CHECK:STDOUT: %import_ref.6: type = import_ref Main//import_generic, loc8_24, loaded [template = constants.%C]
|
|
|
+// CHECK:STDOUT: %import_ref.7: type = import_ref Main//import_generic, loc8_32, loaded [symbolic = @impl.1.%I.type (constants.%I.type.2)]
|
|
|
+// CHECK:STDOUT: %import_ref.8 = import_ref Main//import_generic, loc9_34, unloaded
|
|
|
+// CHECK:STDOUT: %import_ref.9: type = import_ref Main//import_generic, loc12_24, loaded [template = constants.%C]
|
|
|
+// CHECK:STDOUT: %import_ref.10: type = import_ref Main//import_generic, loc12_33, loaded [symbolic = @impl.2.%I.type (constants.%I.type.3)]
|
|
|
+// CHECK:STDOUT: %import_ref.11 = import_ref Main//import_generic, loc12_35, unloaded
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
@@ -215,13 +293,51 @@ impl forall [T:! type] C as I(T*) {}
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %default.import.loc2_6.1 = import <invalid>
|
|
|
// CHECK:STDOUT: %default.import.loc2_6.2 = import <invalid>
|
|
|
-// CHECK:STDOUT: impl_decl @impl.1 [template] {} {
|
|
|
+// CHECK:STDOUT: impl_decl @impl.3 [template] {
|
|
|
+// CHECK:STDOUT: %T.patt.loc8_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc8_14.1, runtime_param<invalid> [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: } {
|
|
|
+// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C]
|
|
|
+// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, imports.%import_ref.2 [template = 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.2)]
|
|
|
+// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
|
|
|
+// CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: impl_decl @impl.4 [template] {
|
|
|
+// CHECK:STDOUT: %T.patt.loc14_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc14_14.1, runtime_param<invalid> [symbolic = %T.patt.loc14_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: } {
|
|
|
+// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C]
|
|
|
+// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, imports.%import_ref.2 [template = 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.2)]
|
|
|
+// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
|
|
|
+// CHECK:STDOUT: %T.loc14_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc14_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: impl_decl @impl.5 [template] {
|
|
|
+// CHECK:STDOUT: %T.patt.loc20_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc20_14.1, runtime_param<invalid> [symbolic = %T.patt.loc20_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: } {
|
|
|
+// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C]
|
|
|
+// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, imports.%import_ref.2 [template = 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 [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.3)]
|
|
|
+// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
|
|
|
+// CHECK:STDOUT: %T.loc20_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc20_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: impl_decl @impl.6 [template] {
|
|
|
+// CHECK:STDOUT: %T.patt.loc26_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc26_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc26_14.1, runtime_param<invalid> [symbolic = %T.patt.loc26_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: } {
|
|
|
// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C]
|
|
|
// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, imports.%import_ref.2 [template = constants.%I.generic]
|
|
|
-// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4 [symbolic = constants.%T]
|
|
|
-// CHECK:STDOUT: %I.type.loc4: type = facet_type <@I, @I(constants.%T)> [symbolic = constants.%I.type.2]
|
|
|
+// 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 [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.3)]
|
|
|
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
|
|
|
-// CHECK:STDOUT: %T.loc4: type = bind_symbolic_name T, 0, %T.param [symbolic = constants.%T]
|
|
|
+// CHECK:STDOUT: %T.loc26_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc26_14.2 (constants.%T)]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
@@ -241,18 +357,15 @@ impl forall [T:! type] C as I(T*) {}
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: generic impl @impl.1(constants.%T: type) [from "import_generic.carbon"] {
|
|
|
-// CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
|
|
|
// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)]
|
|
|
-// CHECK:STDOUT: %I.type.1: type = facet_type <@I, @I(%T.1)> [symbolic = %I.type.1 (constants.%I.type.2)]
|
|
|
+// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.2)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
-// CHECK:STDOUT: %require_complete: <witness> = require_complete_type @impl.1.%I.type.1 (%I.type.2) [symbolic = %require_complete (constants.%require_complete.2)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: impl: imports.%import_ref.6 as imports.%import_ref.7 {
|
|
|
-// CHECK:STDOUT: %interface: <witness> = interface_witness () [template = constants.%interface]
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: witness = %interface
|
|
|
+// CHECK:STDOUT: witness = imports.%import_ref.8
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
@@ -263,11 +376,58 @@ impl forall [T:! type] C as I(T*) {}
|
|
|
// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%ptr)> [symbolic = %I.type (constants.%I.type.3)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
-// CHECK:STDOUT: %require_complete: <witness> = require_complete_type @impl.2.%I.type (%I.type.3) [symbolic = %require_complete (constants.%require_complete.1)]
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: impl: imports.%import_ref.8 as imports.%import_ref.9 {
|
|
|
+// CHECK:STDOUT: impl: imports.%import_ref.9 as imports.%import_ref.10 {
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
+// CHECK:STDOUT: witness = imports.%import_ref.11
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: generic impl @impl.3(%T.loc8_14.1: type) {
|
|
|
+// CHECK:STDOUT: %T.loc8_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %T.patt.loc8_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)]
|
|
|
+// 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.2)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: impl: %C.ref as %I.type.loc8_32.1;
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: generic impl @impl.4(%T.loc14_14.1: type) {
|
|
|
+// CHECK:STDOUT: %T.loc14_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %T.patt.loc14_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_14.2 (constants.%T.patt)]
|
|
|
+// 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.2)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: impl: %C.ref as %I.type.loc14_32.1 {
|
|
|
+// CHECK:STDOUT: %interface: <witness> = interface_witness () [template = constants.%interface]
|
|
|
+// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: witness = imports.%import_ref.10
|
|
|
+// CHECK:STDOUT: witness = %interface
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: generic impl @impl.5(%T.loc20_14.1: type) {
|
|
|
+// CHECK:STDOUT: %T.loc20_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc20_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %T.patt.loc20_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %ptr.loc20_32.2: type = ptr_type @impl.5.%T.loc20_14.2 (%T) [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.3)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: impl: %C.ref as %I.type.loc20_33.1;
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: generic impl @impl.6(%T.loc26_14.1: type) {
|
|
|
+// CHECK:STDOUT: %T.loc26_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc26_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %T.patt.loc26_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc26_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %ptr.loc26_32.2: type = ptr_type @impl.6.%T.loc26_14.2 (%T) [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.3)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: impl: %C.ref as %I.type.loc26_33.1 {
|
|
|
+// CHECK:STDOUT: %interface: <witness> = interface_witness () [template = constants.%interface]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
+// CHECK:STDOUT: witness = %interface
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
@@ -288,17 +448,21 @@ impl forall [T:! type] C as I(T*) {}
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @I(%T) {}
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @I(@impl.1.%T.1) {}
|
|
|
+// CHECK:STDOUT: specific @I(@impl.1.%T) {}
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @impl.1(constants.%T) {
|
|
|
-// CHECK:STDOUT: %T.1 => constants.%T
|
|
|
+// CHECK:STDOUT: %T => constants.%T
|
|
|
// CHECK:STDOUT: %T.patt => constants.%T
|
|
|
-// CHECK:STDOUT: %I.type.1 => constants.%I.type.2
|
|
|
+// CHECK:STDOUT: %I.type => constants.%I.type.2
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @I(constants.%ptr) {
|
|
|
// CHECK:STDOUT: %T => constants.%ptr
|
|
|
// CHECK:STDOUT: %T.patt => constants.%ptr
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
+// CHECK:STDOUT: %I.type => constants.%I.type.3
|
|
|
+// CHECK:STDOUT: %Self => constants.%Self
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @I(@impl.2.%ptr) {}
|
|
|
@@ -310,60 +474,264 @@ impl forall [T:! type] C as I(T*) {}
|
|
|
// CHECK:STDOUT: %I.type => constants.%I.type.3
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- fail_import_generic.impl.carbon
|
|
|
+// CHECK:STDOUT: specific @I(@impl.3.%T.loc8_14.2) {}
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @impl.3(constants.%T) {
|
|
|
+// CHECK:STDOUT: %T.loc8_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %I.type.loc8_32.2 => constants.%I.type.2
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @I(@impl.4.%T.loc14_14.2) {}
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @impl.4(constants.%T) {
|
|
|
+// CHECK:STDOUT: %T.loc14_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %T.patt.loc14_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %I.type.loc14_32.2 => constants.%I.type.2
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @I(@impl.5.%ptr.loc20_32.2) {}
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @impl.5(constants.%T) {
|
|
|
+// CHECK:STDOUT: %T.loc20_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %T.patt.loc20_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %ptr.loc20_32.2 => constants.%ptr
|
|
|
+// CHECK:STDOUT: %I.type.loc20_33.2 => constants.%I.type.3
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @I(@impl.6.%ptr.loc26_32.2) {}
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @impl.6(constants.%T) {
|
|
|
+// CHECK:STDOUT: %T.loc26_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %T.patt.loc26_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %ptr.loc26_32.2 => constants.%ptr
|
|
|
+// CHECK:STDOUT: %I.type.loc26_33.2 => constants.%I.type.3
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: --- fail_import_generic_decl.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
+// CHECK:STDOUT: %D: type = class_type @D [template]
|
|
|
+// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
|
|
|
+// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
|
|
|
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
|
|
|
-// CHECK:STDOUT: %I.type.1: type = generic_interface_type @I [template]
|
|
|
-// CHECK:STDOUT: %I.generic: %I.type.1 = struct_value () [template]
|
|
|
-// CHECK:STDOUT: %I.type.2: type = facet_type <@I, @I(%T)> [symbolic]
|
|
|
-// CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
|
|
// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
|
|
|
-// CHECK:STDOUT: %C: type = class_type @C [template]
|
|
|
+// CHECK:STDOUT: %J.type.1: type = generic_interface_type @J [template]
|
|
|
+// CHECK:STDOUT: %J.generic: %J.type.1 = struct_value () [template]
|
|
|
+// CHECK:STDOUT: %J.type.2: type = facet_type <@J, @J(%T)> [symbolic]
|
|
|
+// CHECK:STDOUT: %Self: %J.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
|
|
+// CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic]
|
|
|
+// CHECK:STDOUT: %J.type.3: type = facet_type <@J, @J(%ptr)> [symbolic]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: file {
|
|
|
+// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
+// CHECK:STDOUT: .D = %D.decl
|
|
|
+// CHECK:STDOUT: .J = %J.decl
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} {}
|
|
|
+// CHECK:STDOUT: %J.decl: %J.type.1 = interface_decl @J [template = constants.%J.generic] {
|
|
|
+// CHECK:STDOUT: %T.patt.loc5_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_13.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc5_13.1, runtime_param<invalid> [symbolic = %T.patt.loc5_13.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: } {
|
|
|
+// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
|
|
|
+// CHECK:STDOUT: %T.loc5_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc5_13.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: impl_decl @impl.1 [template] {
|
|
|
+// CHECK:STDOUT: %T.patt.loc11_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc11_14.1, runtime_param<invalid> [symbolic = %T.patt.loc11_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: } {
|
|
|
+// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D]
|
|
|
+// CHECK:STDOUT: %J.ref: %J.type.1 = name_ref J, file.%J.decl [template = 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.2)]
|
|
|
+// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
|
|
|
+// CHECK:STDOUT: %T.loc11_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc11_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: impl_decl @impl.2 [template] {
|
|
|
+// CHECK:STDOUT: %T.patt.loc17_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc17_14.1, runtime_param<invalid> [symbolic = %T.patt.loc17_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: } {
|
|
|
+// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D]
|
|
|
+// CHECK:STDOUT: %J.ref: %J.type.1 = name_ref J, file.%J.decl [template = 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 [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.3)]
|
|
|
+// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
|
|
|
+// CHECK:STDOUT: %T.loc17_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc17_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: generic interface @J(%T.loc5_13.1: type) {
|
|
|
+// CHECK:STDOUT: %T.loc5_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_13.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %T.patt.loc5_13.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_13.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
+// CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T.loc5_13.2)> [symbolic = %J.type (constants.%J.type.2)]
|
|
|
+// CHECK:STDOUT: %Self.2: %J.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: interface {
|
|
|
+// CHECK:STDOUT: %Self.1: @J.%J.type (%J.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
+// CHECK:STDOUT: .Self = %Self.1
|
|
|
+// CHECK:STDOUT: witness = ()
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: generic impl @impl.1(%T.loc11_14.1: type) {
|
|
|
+// CHECK:STDOUT: %T.loc11_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %T.patt.loc11_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_14.2 (constants.%T.patt)]
|
|
|
+// 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.2)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: impl: %D.ref as %J.type.loc11_32.1;
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: generic impl @impl.2(%T.loc17_14.1: type) {
|
|
|
+// CHECK:STDOUT: %T.loc17_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc17_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %T.patt.loc17_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %ptr.loc17_32.2: type = ptr_type @impl.2.%T.loc17_14.2 (%T) [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.3)]
|
|
|
+// 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 %empty_struct_type [template = constants.%complete_type]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
+// CHECK:STDOUT: .Self = constants.%D
|
|
|
+// CHECK:STDOUT: complete_type_witness = %complete_type
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @J(constants.%T) {
|
|
|
+// CHECK:STDOUT: %T.loc5_13.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %T.patt.loc5_13.2 => constants.%T
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
+// CHECK:STDOUT: %J.type => constants.%J.type.2
|
|
|
+// CHECK:STDOUT: %Self.2 => constants.%Self
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @J(%T.loc5_13.2) {}
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @J(@impl.1.%T.loc11_14.2) {}
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @impl.1(constants.%T) {
|
|
|
+// CHECK:STDOUT: %T.loc11_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %T.patt.loc11_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %J.type.loc11_32.2 => constants.%J.type.2
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @J(constants.%ptr) {
|
|
|
+// CHECK:STDOUT: %T.loc5_13.2 => constants.%ptr
|
|
|
+// CHECK:STDOUT: %T.patt.loc5_13.2 => constants.%ptr
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
+// CHECK:STDOUT: %J.type => constants.%J.type.3
|
|
|
+// CHECK:STDOUT: %Self.2 => constants.%Self
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @J(@impl.2.%ptr.loc17_32.2) {}
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @impl.2(constants.%T) {
|
|
|
+// CHECK:STDOUT: %T.loc17_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %T.patt.loc17_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %ptr.loc17_32.2 => constants.%ptr
|
|
|
+// CHECK:STDOUT: %J.type.loc17_33.2 => constants.%J.type.3
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: --- fail_import_generic_decl.impl.carbon
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: constants {
|
|
|
+// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
|
|
|
+// CHECK:STDOUT: %J.type.1: type = generic_interface_type @J [template]
|
|
|
+// CHECK:STDOUT: %J.generic: %J.type.1 = struct_value () [template]
|
|
|
+// CHECK:STDOUT: %J.type.2: type = facet_type <@J, @J(%T)> [symbolic]
|
|
|
+// CHECK:STDOUT: %Self: %J.type.2 = bind_symbolic_name Self, 1 [symbolic]
|
|
|
+// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
|
|
|
+// CHECK:STDOUT: %D: type = class_type @D [template]
|
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
|
|
|
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
|
|
|
// CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic]
|
|
|
-// CHECK:STDOUT: %I.type.3: type = facet_type <@I, @I(%ptr)> [symbolic]
|
|
|
+// CHECK:STDOUT: %J.type.3: type = facet_type <@J, @J(%ptr)> [symbolic]
|
|
|
+// CHECK:STDOUT: %interface: <witness> = interface_witness () [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: imports {
|
|
|
-// CHECK:STDOUT: %import_ref.1: type = import_ref Main//import_generic, C, loaded [template = constants.%C]
|
|
|
-// CHECK:STDOUT: %import_ref.2: %I.type.1 = import_ref Main//import_generic, I, loaded [template = constants.%I.generic]
|
|
|
-// CHECK:STDOUT: %import_ref.3 = import_ref Main//import_generic, inst31 [no loc], unloaded
|
|
|
-// CHECK:STDOUT: %import_ref.4: <witness> = import_ref Main//import_generic, loc4_10, loaded [template = constants.%complete_type]
|
|
|
-// CHECK:STDOUT: %import_ref.5 = import_ref Main//import_generic, inst14 [no loc], unloaded
|
|
|
-// CHECK:STDOUT: %import_ref.6: type = import_ref Main//import_generic, loc7_24, loaded [template = constants.%C]
|
|
|
-// CHECK:STDOUT: %import_ref.7: type = import_ref Main//import_generic, loc7_32, loaded [symbolic = @impl.1.%I.type (constants.%I.type.2)]
|
|
|
-// CHECK:STDOUT: %import_ref.8: type = import_ref Main//import_generic, loc8_24, loaded [template = constants.%C]
|
|
|
-// CHECK:STDOUT: %import_ref.9: type = import_ref Main//import_generic, loc8_33, loaded [symbolic = @impl.2.%I.type.1 (constants.%I.type.3)]
|
|
|
-// CHECK:STDOUT: %import_ref.10 = import_ref Main//import_generic, loc8_35, unloaded
|
|
|
+// CHECK:STDOUT: %import_ref.1: type = import_ref Main//import_generic_decl, D, loaded [template = constants.%D]
|
|
|
+// CHECK:STDOUT: %import_ref.2: %J.type.1 = import_ref Main//import_generic_decl, J, loaded [template = constants.%J.generic]
|
|
|
+// CHECK:STDOUT: %import_ref.3 = import_ref Main//import_generic_decl, inst31 [no loc], unloaded
|
|
|
+// CHECK:STDOUT: %import_ref.4: <witness> = import_ref Main//import_generic_decl, loc4_10, loaded [template = constants.%complete_type]
|
|
|
+// CHECK:STDOUT: %import_ref.5 = import_ref Main//import_generic_decl, inst14 [no loc], unloaded
|
|
|
+// CHECK:STDOUT: %import_ref.6: type = import_ref Main//import_generic_decl, loc11_24, loaded [template = constants.%D]
|
|
|
+// CHECK:STDOUT: %import_ref.7: type = import_ref Main//import_generic_decl, loc11_32, loaded [symbolic = @impl.1.%J.type (constants.%J.type.2)]
|
|
|
+// CHECK:STDOUT: %import_ref.8: type = import_ref Main//import_generic_decl, loc17_24, loaded [template = constants.%D]
|
|
|
+// CHECK:STDOUT: %import_ref.9: type = import_ref Main//import_generic_decl, loc17_33, loaded [symbolic = @impl.2.%J.type (constants.%J.type.3)]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
-// CHECK:STDOUT: .C = imports.%import_ref.1
|
|
|
-// CHECK:STDOUT: .I = imports.%import_ref.2
|
|
|
+// CHECK:STDOUT: .D = imports.%import_ref.1
|
|
|
+// CHECK:STDOUT: .J = imports.%import_ref.2
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %default.import.loc2_6.1 = import <invalid>
|
|
|
// CHECK:STDOUT: %default.import.loc2_6.2 = import <invalid>
|
|
|
-// CHECK:STDOUT: impl_decl @impl.2 [template] {} {
|
|
|
-// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C]
|
|
|
-// CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, imports.%import_ref.2 [template = constants.%I.generic]
|
|
|
-// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11 [symbolic = constants.%T]
|
|
|
-// CHECK:STDOUT: %ptr.loc11: type = ptr_type %T [symbolic = constants.%ptr]
|
|
|
-// CHECK:STDOUT: %I.type.loc11: type = facet_type <@I, @I(constants.%ptr)> [symbolic = constants.%I.type.3]
|
|
|
+// CHECK:STDOUT: impl_decl @impl.3 [template] {
|
|
|
+// CHECK:STDOUT: %T.patt.loc8_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc8_14.1, runtime_param<invalid> [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: } {
|
|
|
+// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.1 [template = constants.%D]
|
|
|
+// CHECK:STDOUT: %J.ref: %J.type.1 = name_ref J, imports.%import_ref.2 [template = 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.2)]
|
|
|
+// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
|
|
|
+// CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: impl_decl @impl.4 [template] {
|
|
|
+// CHECK:STDOUT: %T.patt.loc14_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc14_14.1, runtime_param<invalid> [symbolic = %T.patt.loc14_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: } {
|
|
|
+// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.1 [template = constants.%D]
|
|
|
+// CHECK:STDOUT: %J.ref: %J.type.1 = name_ref J, imports.%import_ref.2 [template = 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.2)]
|
|
|
// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
|
|
|
-// CHECK:STDOUT: %T.loc11: type = bind_symbolic_name T, 0, %T.param [symbolic = constants.%T]
|
|
|
+// CHECK:STDOUT: %T.loc14_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc14_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: impl_decl @impl.5 [template] {
|
|
|
+// CHECK:STDOUT: %T.patt.loc20_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc20_14.1, runtime_param<invalid> [symbolic = %T.patt.loc20_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: } {
|
|
|
+// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.1 [template = constants.%D]
|
|
|
+// CHECK:STDOUT: %J.ref: %J.type.1 = name_ref J, imports.%import_ref.2 [template = 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 [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.3)]
|
|
|
+// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
|
|
|
+// CHECK:STDOUT: %T.loc20_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc20_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: impl_decl @impl.6 [template] {
|
|
|
+// CHECK:STDOUT: %T.patt.loc25_14.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc25_14.1, runtime_param<invalid> [symbolic = %T.patt.loc25_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: } {
|
|
|
+// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.1 [template = constants.%D]
|
|
|
+// CHECK:STDOUT: %J.ref: %J.type.1 = name_ref J, imports.%import_ref.2 [template = constants.%J.generic]
|
|
|
+// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc25_14.1 [symbolic = %T.loc25_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %ptr.loc25_32.1: type = ptr_type %T [symbolic = %ptr.loc25_32.2 (constants.%ptr)]
|
|
|
+// CHECK:STDOUT: %J.type.loc25_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc25_33.2 (constants.%J.type.3)]
|
|
|
+// CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
|
|
|
+// CHECK:STDOUT: %T.loc25_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc25_14.2 (constants.%T)]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic interface @I(constants.%T: type) [from "import_generic.carbon"] {
|
|
|
+// CHECK:STDOUT: generic interface @J(constants.%T: type) [from "fail_import_generic_decl.carbon"] {
|
|
|
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
|
|
|
// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
-// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.2)]
|
|
|
-// CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)]
|
|
|
+// CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.2)]
|
|
|
+// CHECK:STDOUT: %Self: %J.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: interface {
|
|
|
// CHECK:STDOUT: !members:
|
|
|
@@ -372,60 +740,145 @@ impl forall [T:! type] C as I(T*) {}
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic impl @impl.1(constants.%T: type) [from "import_generic.carbon"] {
|
|
|
+// CHECK:STDOUT: generic impl @impl.1(constants.%T: type) [from "fail_import_generic_decl.carbon"] {
|
|
|
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
|
|
|
// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)]
|
|
|
-// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.2)]
|
|
|
+// CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.2)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: impl: imports.%import_ref.6 as imports.%import_ref.7;
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: generic impl @impl.2(constants.%T: type) [from "import_generic.carbon"] {
|
|
|
-// CHECK:STDOUT: %T.1: type = bind_symbolic_name T, 0 [symbolic = %T.1 (constants.%T)]
|
|
|
+// CHECK:STDOUT: generic impl @impl.2(constants.%T: type) [from "fail_import_generic_decl.carbon"] {
|
|
|
+// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
|
|
|
// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)]
|
|
|
-// CHECK:STDOUT: %ptr.1: type = ptr_type @impl.2.%T.1 (%T) [symbolic = %ptr.1 (constants.%ptr)]
|
|
|
-// CHECK:STDOUT: %I.type.1: type = facet_type <@I, @I(%ptr.1)> [symbolic = %I.type.1 (constants.%I.type.3)]
|
|
|
+// CHECK:STDOUT: %ptr: type = ptr_type @impl.2.%T (%T) [symbolic = %ptr (constants.%ptr)]
|
|
|
+// CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%ptr)> [symbolic = %J.type (constants.%J.type.3)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: impl: imports.%import_ref.8 as imports.%import_ref.9;
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: generic impl @impl.3(%T.loc8_14.1: type) {
|
|
|
+// CHECK:STDOUT: %T.loc8_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %T.patt.loc8_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)]
|
|
|
+// 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.2)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: impl: %D.ref as %J.type.loc8_32.1;
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: generic impl @impl.4(%T.loc14_14.1: type) {
|
|
|
+// CHECK:STDOUT: %T.loc14_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %T.patt.loc14_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_14.2 (constants.%T.patt)]
|
|
|
+// 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.2)]
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !definition:
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: impl: imports.%import_ref.8 as imports.%import_ref.9 {
|
|
|
+// CHECK:STDOUT: impl: %D.ref as %J.type.loc14_32.1 {
|
|
|
+// CHECK:STDOUT: %interface: <witness> = interface_witness () [template = constants.%interface]
|
|
|
+// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: witness = imports.%import_ref.10
|
|
|
+// CHECK:STDOUT: witness = %interface
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @C [from "import_generic.carbon"] {
|
|
|
+// CHECK:STDOUT: generic impl @impl.5(%T.loc20_14.1: type) {
|
|
|
+// CHECK:STDOUT: %T.loc20_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc20_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %T.patt.loc20_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %ptr.loc20_32.2: type = ptr_type @impl.5.%T.loc20_14.2 (%T) [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.3)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: impl: %D.ref as %J.type.loc20_33.1;
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: generic impl @impl.6(%T.loc25_14.1: type) {
|
|
|
+// CHECK:STDOUT: %T.loc25_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc25_14.2 (constants.%T)]
|
|
|
+// CHECK:STDOUT: %T.patt.loc25_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_14.2 (constants.%T.patt)]
|
|
|
+// CHECK:STDOUT: %ptr.loc25_32.2: type = ptr_type @impl.6.%T.loc25_14.2 (%T) [symbolic = %ptr.loc25_32.2 (constants.%ptr)]
|
|
|
+// CHECK:STDOUT: %J.type.loc25_33.2: type = facet_type <@J, @J(%ptr.loc25_32.2)> [symbolic = %J.type.loc25_33.2 (constants.%J.type.3)]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: impl: %D.ref as %J.type.loc25_33.1 {
|
|
|
+// CHECK:STDOUT: %interface: <witness> = interface_witness () [template = constants.%interface]
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !members:
|
|
|
+// CHECK:STDOUT: witness = %interface
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: class @D [from "fail_import_generic_decl.carbon"] {
|
|
|
// CHECK:STDOUT: !members:
|
|
|
// CHECK:STDOUT: .Self = imports.%import_ref.5
|
|
|
// CHECK:STDOUT: complete_type_witness = imports.%import_ref.4
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @I(constants.%T) {
|
|
|
+// CHECK:STDOUT: specific @J(constants.%T) {
|
|
|
// CHECK:STDOUT: %T => constants.%T
|
|
|
// CHECK:STDOUT: %T.patt => constants.%T
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
+// CHECK:STDOUT: %J.type => constants.%J.type.2
|
|
|
+// CHECK:STDOUT: %Self => constants.%Self
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @I(%T) {}
|
|
|
+// CHECK:STDOUT: specific @J(%T) {}
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @I(@impl.1.%T) {}
|
|
|
+// CHECK:STDOUT: specific @J(@impl.1.%T) {}
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @impl.1(constants.%T) {
|
|
|
// CHECK:STDOUT: %T => constants.%T
|
|
|
// CHECK:STDOUT: %T.patt => constants.%T
|
|
|
-// CHECK:STDOUT: %I.type => constants.%I.type.2
|
|
|
+// CHECK:STDOUT: %J.type => constants.%J.type.2
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @I(constants.%ptr) {
|
|
|
+// CHECK:STDOUT: specific @J(constants.%ptr) {
|
|
|
// CHECK:STDOUT: %T => constants.%ptr
|
|
|
// CHECK:STDOUT: %T.patt => constants.%ptr
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: !definition:
|
|
|
+// CHECK:STDOUT: %J.type => constants.%J.type.3
|
|
|
+// CHECK:STDOUT: %Self => constants.%Self
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: specific @I(@impl.2.%ptr.1) {}
|
|
|
+// CHECK:STDOUT: specific @J(@impl.2.%ptr) {}
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: specific @impl.2(constants.%T) {
|
|
|
-// CHECK:STDOUT: %T.1 => constants.%T
|
|
|
+// CHECK:STDOUT: %T => constants.%T
|
|
|
// CHECK:STDOUT: %T.patt => constants.%T
|
|
|
-// CHECK:STDOUT: %ptr.1 => constants.%ptr
|
|
|
-// CHECK:STDOUT: %I.type.1 => constants.%I.type.3
|
|
|
+// CHECK:STDOUT: %ptr => constants.%ptr
|
|
|
+// CHECK:STDOUT: %J.type => constants.%J.type.3
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @J(@impl.3.%T.loc8_14.2) {}
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @impl.3(constants.%T) {
|
|
|
+// CHECK:STDOUT: %T.loc8_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %J.type.loc8_32.2 => constants.%J.type.2
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @J(@impl.4.%T.loc14_14.2) {}
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @impl.4(constants.%T) {
|
|
|
+// CHECK:STDOUT: %T.loc14_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %T.patt.loc14_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %J.type.loc14_32.2 => constants.%J.type.2
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @J(@impl.5.%ptr.loc20_32.2) {}
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @impl.5(constants.%T) {
|
|
|
+// CHECK:STDOUT: %T.loc20_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %T.patt.loc20_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %ptr.loc20_32.2 => constants.%ptr
|
|
|
+// CHECK:STDOUT: %J.type.loc20_33.2 => constants.%J.type.3
|
|
|
+// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @J(@impl.6.%ptr.loc25_32.2) {}
|
|
|
+// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: specific @impl.6(constants.%T) {
|
|
|
+// CHECK:STDOUT: %T.loc25_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %T.patt.loc25_14.2 => constants.%T
|
|
|
+// CHECK:STDOUT: %ptr.loc25_32.2 => constants.%ptr
|
|
|
+// CHECK:STDOUT: %J.type.loc25_33.2 => constants.%J.type.3
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|