import_generic.carbon 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon
  6. // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
  7. // EXTRA-ARGS: --dump-sem-ir-ranges=if-present
  8. //
  9. // AUTOUPDATE
  10. // TIP: To test this file alone, run:
  11. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/impl/import_generic.carbon
  12. // TIP: To dump output, run:
  13. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/import_generic.carbon
  14. // --- import_generic.carbon
  15. library "[[@TEST_NAME]]";
  16. class C {}
  17. interface I(T:! type) {}
  18. // Has both declaration and definition.
  19. impl forall [T:! type] C as I(T);
  20. impl forall [T:! type] C as I(T) {}
  21. // Only has definition.
  22. impl forall [T:! type] C as I(T*) {}
  23. // --- fail_import_generic.impl.carbon
  24. impl library "[[@TEST_NAME]]";
  25. // CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
  26. // CHECK:STDERR: impl forall [T:! type] C as I(T);
  27. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  28. // CHECK:STDERR:
  29. impl forall [T:! type] C as I(T);
  30. // CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
  31. // CHECK:STDERR: impl forall [T:! type] C as I(T) {}
  32. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  33. // CHECK:STDERR:
  34. impl forall [T:! type] C as I(T) {}
  35. // CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
  36. // CHECK:STDERR: impl forall [T:! type] C as I(T*);
  37. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  38. // CHECK:STDERR:
  39. impl forall [T:! type] C as I(T*);
  40. // CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
  41. // CHECK:STDERR: impl forall [T:! type] C as I(T*) {}
  42. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  43. // CHECK:STDERR:
  44. impl forall [T:! type] C as I(T*) {}
  45. // --- fail_import_generic_decl.carbon
  46. library "[[@TEST_NAME]]";
  47. class D {}
  48. interface J(T:! type) {}
  49. // CHECK:STDERR: fail_import_generic_decl.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition]
  50. // CHECK:STDERR: impl forall [T:! type] D as J(T);
  51. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  52. // CHECK:STDERR:
  53. impl forall [T:! type] D as J(T);
  54. // CHECK:STDERR: fail_import_generic_decl.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition]
  55. // CHECK:STDERR: impl forall [T:! type] D as J(T*);
  56. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  57. // CHECK:STDERR:
  58. impl forall [T:! type] D as J(T*);
  59. // --- fail_import_generic_decl.impl.carbon
  60. impl library "[[@TEST_NAME]]";
  61. // CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
  62. // CHECK:STDERR: impl forall [T:! type] D as J(T);
  63. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  64. // CHECK:STDERR:
  65. impl forall [T:! type] D as J(T);
  66. // CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
  67. // CHECK:STDERR: impl forall [T:! type] D as J(T) {}
  68. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  69. // CHECK:STDERR:
  70. impl forall [T:! type] D as J(T) {}
  71. // CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
  72. // CHECK:STDERR: impl forall [T:! type] D as J(T*);
  73. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  74. // CHECK:STDERR:
  75. impl forall [T:! type] D as J(T*);
  76. // CHECK:STDERR: fail_import_generic_decl.impl.carbon:[[@LINE+4]]:1: error: redeclaration of imported impl [RedeclImportedImpl]
  77. // CHECK:STDERR: impl forall [T:! type] D as J(T*) {}
  78. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  79. // CHECK:STDERR:
  80. impl forall [T:! type] D as J(T*) {}
  81. // CHECK:STDOUT: --- import_generic.carbon
  82. // CHECK:STDOUT:
  83. // CHECK:STDOUT: constants {
  84. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  85. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  86. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  87. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  88. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  89. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  90. // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
  91. // CHECK:STDOUT: %I.type.dac: type = generic_interface_type @I [concrete]
  92. // CHECK:STDOUT: %I.generic: %I.type.dac = struct_value () [concrete]
  93. // CHECK:STDOUT: %I.type.070: type = facet_type <@I, @I(%T)> [symbolic]
  94. // CHECK:STDOUT: %Self.269: %I.type.070 = symbolic_binding Self, 1 [symbolic]
  95. // CHECK:STDOUT: %I.impl_witness.f13: <witness> = impl_witness file.%I.impl_witness_table.loc8, @C.as.I.impl.f3e(%T) [symbolic]
  96. // CHECK:STDOUT: %require_complete.c94: <witness> = require_complete_type %I.type.070 [symbolic]
  97. // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic]
  98. // CHECK:STDOUT: %I.type.229: type = facet_type <@I, @I(%ptr)> [symbolic]
  99. // CHECK:STDOUT: %Self.6d0: %I.type.229 = symbolic_binding Self, 1 [symbolic]
  100. // CHECK:STDOUT: %require_complete.555: <witness> = require_complete_type %I.type.229 [symbolic]
  101. // CHECK:STDOUT: %I.impl_witness.a0f: <witness> = impl_witness file.%I.impl_witness_table.loc12, @C.as.I.impl.1fd(%T) [symbolic]
  102. // CHECK:STDOUT: }
  103. // CHECK:STDOUT:
  104. // CHECK:STDOUT: file {
  105. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  106. // CHECK:STDOUT: .C = %C.decl
  107. // CHECK:STDOUT: .I = %I.decl
  108. // CHECK:STDOUT: }
  109. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  110. // CHECK:STDOUT: %I.decl: %I.type.dac = interface_decl @I [concrete = constants.%I.generic] {
  111. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  112. // CHECK:STDOUT: } {
  113. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  114. // CHECK:STDOUT: %T.loc5_13.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T)]
  115. // CHECK:STDOUT: }
  116. // CHECK:STDOUT: impl_decl @C.as.I.impl.f3e [concrete] {
  117. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  118. // CHECK:STDOUT: } {
  119. // CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [concrete = constants.%C]
  120. // CHECK:STDOUT: %I.ref.loc8: %I.type.dac = name_ref I, file.%I.decl [concrete = constants.%I.generic]
  121. // CHECK:STDOUT: %T.ref.loc8: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)]
  122. // CHECK:STDOUT: %I.type.loc8_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.070)]
  123. // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  124. // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
  125. // CHECK:STDOUT: }
  126. // CHECK:STDOUT: %I.impl_witness_table.loc8 = impl_witness_table (), @C.as.I.impl.f3e [concrete]
  127. // 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)]
  128. // CHECK:STDOUT: impl_decl @C.as.I.impl.f3e [concrete] {
  129. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  130. // CHECK:STDOUT: } {
  131. // CHECK:STDOUT: %C.ref.loc9: type = name_ref C, file.%C.decl [concrete = constants.%C]
  132. // CHECK:STDOUT: %I.ref.loc9: %I.type.dac = name_ref I, file.%I.decl [concrete = constants.%I.generic]
  133. // CHECK:STDOUT: %T.ref.loc9: type = name_ref T, %T.loc9 [symbolic = %T.loc8_14.2 (constants.%T)]
  134. // CHECK:STDOUT: %I.type.loc9: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.070)]
  135. // CHECK:STDOUT: %.Self.1: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  136. // CHECK:STDOUT: %T.loc9: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
  137. // CHECK:STDOUT: }
  138. // CHECK:STDOUT: impl_decl @C.as.I.impl.1fd [concrete] {
  139. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  140. // CHECK:STDOUT: } {
  141. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
  142. // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, file.%I.decl [concrete = constants.%I.generic]
  143. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc12_14.1 [symbolic = %T.loc12_14.2 (constants.%T)]
  144. // CHECK:STDOUT: %ptr.loc12_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc12_32.2 (constants.%ptr)]
  145. // CHECK:STDOUT: %I.type.loc12_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc12_33.2 (constants.%I.type.229)]
  146. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  147. // CHECK:STDOUT: %T.loc12_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc12_14.2 (constants.%T)]
  148. // CHECK:STDOUT: }
  149. // CHECK:STDOUT: %I.impl_witness_table.loc12 = impl_witness_table (), @C.as.I.impl.1fd [concrete]
  150. // 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)]
  151. // CHECK:STDOUT: }
  152. // CHECK:STDOUT:
  153. // CHECK:STDOUT: generic interface @I(%T.loc5_13.2: type) {
  154. // CHECK:STDOUT: %T.loc5_13.1: type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T)]
  155. // CHECK:STDOUT:
  156. // CHECK:STDOUT: !definition:
  157. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc5_13.1)> [symbolic = %I.type (constants.%I.type.070)]
  158. // CHECK:STDOUT: %Self.loc5_23.2: @I.%I.type (%I.type.070) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.269)]
  159. // CHECK:STDOUT:
  160. // CHECK:STDOUT: interface {
  161. // CHECK:STDOUT: %Self.loc5_23.1: @I.%I.type (%I.type.070) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.269)]
  162. // CHECK:STDOUT:
  163. // CHECK:STDOUT: !members:
  164. // CHECK:STDOUT: .Self = %Self.loc5_23.1
  165. // CHECK:STDOUT: witness = ()
  166. // CHECK:STDOUT:
  167. // CHECK:STDOUT: !requires:
  168. // CHECK:STDOUT: }
  169. // CHECK:STDOUT: }
  170. // CHECK:STDOUT:
  171. // CHECK:STDOUT: generic impl @C.as.I.impl.f3e(%T.loc8_14.1: type) {
  172. // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
  173. // 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)]
  174. // 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)]
  175. // CHECK:STDOUT:
  176. // CHECK:STDOUT: !definition:
  177. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type.loc8_32.2 [symbolic = %require_complete (constants.%require_complete.c94)]
  178. // CHECK:STDOUT:
  179. // CHECK:STDOUT: impl: %C.ref.loc8 as %I.type.loc8_32.1 {
  180. // CHECK:STDOUT: !members:
  181. // CHECK:STDOUT: witness = file.%I.impl_witness.loc8
  182. // CHECK:STDOUT: }
  183. // CHECK:STDOUT: }
  184. // CHECK:STDOUT:
  185. // CHECK:STDOUT: generic impl @C.as.I.impl.1fd(%T.loc12_14.1: type) {
  186. // CHECK:STDOUT: %T.loc12_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc12_14.2 (constants.%T)]
  187. // CHECK:STDOUT: %ptr.loc12_32.2: type = ptr_type %T.loc12_14.2 [symbolic = %ptr.loc12_32.2 (constants.%ptr)]
  188. // 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)]
  189. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type.loc12_33.2 [symbolic = %require_complete (constants.%require_complete.555)]
  190. // 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)]
  191. // CHECK:STDOUT:
  192. // CHECK:STDOUT: !definition:
  193. // CHECK:STDOUT:
  194. // CHECK:STDOUT: impl: %C.ref as %I.type.loc12_33.1 {
  195. // CHECK:STDOUT: !members:
  196. // CHECK:STDOUT: witness = file.%I.impl_witness.loc12
  197. // CHECK:STDOUT: }
  198. // CHECK:STDOUT: }
  199. // CHECK:STDOUT:
  200. // CHECK:STDOUT: class @C {
  201. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  202. // CHECK:STDOUT: complete_type_witness = %complete_type
  203. // CHECK:STDOUT:
  204. // CHECK:STDOUT: !members:
  205. // CHECK:STDOUT: .Self = constants.%C
  206. // CHECK:STDOUT: }
  207. // CHECK:STDOUT:
  208. // CHECK:STDOUT: specific @I(constants.%T) {
  209. // CHECK:STDOUT: %T.loc5_13.1 => constants.%T
  210. // CHECK:STDOUT:
  211. // CHECK:STDOUT: !definition:
  212. // CHECK:STDOUT: %I.type => constants.%I.type.070
  213. // CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.269
  214. // CHECK:STDOUT: }
  215. // CHECK:STDOUT:
  216. // CHECK:STDOUT: specific @C.as.I.impl.f3e(constants.%T) {
  217. // CHECK:STDOUT: %T.loc8_14.2 => constants.%T
  218. // CHECK:STDOUT: %I.type.loc8_32.2 => constants.%I.type.070
  219. // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.f13
  220. // CHECK:STDOUT: }
  221. // CHECK:STDOUT:
  222. // CHECK:STDOUT: specific @I(constants.%ptr) {
  223. // CHECK:STDOUT: %T.loc5_13.1 => constants.%ptr
  224. // CHECK:STDOUT:
  225. // CHECK:STDOUT: !definition:
  226. // CHECK:STDOUT: %I.type => constants.%I.type.229
  227. // CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.6d0
  228. // CHECK:STDOUT: }
  229. // CHECK:STDOUT:
  230. // CHECK:STDOUT: specific @C.as.I.impl.1fd(constants.%T) {
  231. // CHECK:STDOUT: %T.loc12_14.2 => constants.%T
  232. // CHECK:STDOUT: %ptr.loc12_32.2 => constants.%ptr
  233. // CHECK:STDOUT: %I.type.loc12_33.2 => constants.%I.type.229
  234. // CHECK:STDOUT: %require_complete => constants.%require_complete.555
  235. // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.a0f
  236. // CHECK:STDOUT: }
  237. // CHECK:STDOUT:
  238. // CHECK:STDOUT: --- fail_import_generic.impl.carbon
  239. // CHECK:STDOUT:
  240. // CHECK:STDOUT: constants {
  241. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  242. // CHECK:STDOUT: %I.type.dac: type = generic_interface_type @I [concrete]
  243. // CHECK:STDOUT: %I.generic: %I.type.dac = struct_value () [concrete]
  244. // CHECK:STDOUT: %I.type.070: type = facet_type <@I, @I(%T)> [symbolic]
  245. // CHECK:STDOUT: %Self.269: %I.type.070 = symbolic_binding Self, 1 [symbolic]
  246. // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
  247. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  248. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  249. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  250. // CHECK:STDOUT: %I.impl_witness.f13: <witness> = impl_witness imports.%I.impl_witness_table.478, @C.as.I.impl.f3ed6b.1(%T) [symbolic]
  251. // CHECK:STDOUT: %require_complete.c94: <witness> = require_complete_type %I.type.070 [symbolic]
  252. // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic]
  253. // CHECK:STDOUT: %I.type.229: type = facet_type <@I, @I(%ptr)> [symbolic]
  254. // CHECK:STDOUT: %require_complete.555: <witness> = require_complete_type %I.type.229 [symbolic]
  255. // CHECK:STDOUT: %I.impl_witness.a0f: <witness> = impl_witness imports.%I.impl_witness_table.af9, @C.as.I.impl.1fddff.1(%T) [symbolic]
  256. // CHECK:STDOUT: %Self.6d0: %I.type.229 = symbolic_binding Self, 1 [symbolic]
  257. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  258. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  259. // CHECK:STDOUT: }
  260. // CHECK:STDOUT:
  261. // CHECK:STDOUT: imports {
  262. // CHECK:STDOUT: %Main.C: type = import_ref Main//import_generic, C, loaded [concrete = constants.%C]
  263. // CHECK:STDOUT: %Main.I: %I.type.dac = import_ref Main//import_generic, I, loaded [concrete = constants.%I.generic]
  264. // CHECK:STDOUT: %Main.import_ref.efcd44.1: type = import_ref Main//import_generic, loc5_13, loaded [symbolic = @I.%T (constants.%T)]
  265. // CHECK:STDOUT: %Main.import_ref.769 = import_ref Main//import_generic, loc5_23, unloaded
  266. // CHECK:STDOUT: %Main.import_ref.e46 = import_ref Main//import_generic, loc8_33, unloaded
  267. // CHECK:STDOUT: %Main.import_ref.8f2: <witness> = import_ref Main//import_generic, loc4_10, loaded [concrete = constants.%complete_type]
  268. // CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//import_generic, inst{{[0-9A-F]+}} [no loc], unloaded
  269. // 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)]
  270. // CHECK:STDOUT: %Main.import_ref.29aca8.1: type = import_ref Main//import_generic, loc8_24, loaded [concrete = constants.%C]
  271. // 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)]
  272. // CHECK:STDOUT: %I.impl_witness_table.478 = impl_witness_table (), @C.as.I.impl.f3ed6b.1 [concrete]
  273. // CHECK:STDOUT: %Main.import_ref.4f8 = import_ref Main//import_generic, loc12_35, unloaded
  274. // 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)]
  275. // CHECK:STDOUT: %Main.import_ref.29aca8.2: type = import_ref Main//import_generic, loc12_24, loaded [concrete = constants.%C]
  276. // 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)]
  277. // CHECK:STDOUT: %I.impl_witness_table.af9 = impl_witness_table (), @C.as.I.impl.1fddff.1 [concrete]
  278. // CHECK:STDOUT: }
  279. // CHECK:STDOUT:
  280. // CHECK:STDOUT: file {
  281. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  282. // CHECK:STDOUT: .C = imports.%Main.C
  283. // CHECK:STDOUT: .I = imports.%Main.I
  284. // CHECK:STDOUT: }
  285. // CHECK:STDOUT: %default.import.loc2_30.1 = import <none>
  286. // CHECK:STDOUT: %default.import.loc2_30.2 = import <none>
  287. // CHECK:STDOUT: impl_decl @C.as.I.impl.f3ed6b.2 [concrete] {
  288. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  289. // CHECK:STDOUT: } {
  290. // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
  291. // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, imports.%Main.I [concrete = constants.%I.generic]
  292. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)]
  293. // CHECK:STDOUT: %I.type.loc8_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.070)]
  294. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  295. // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
  296. // CHECK:STDOUT: }
  297. // CHECK:STDOUT: impl_decl @C.as.I.impl.f3ed6b.3 [concrete] {
  298. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  299. // CHECK:STDOUT: } {
  300. // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
  301. // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, imports.%Main.I [concrete = constants.%I.generic]
  302. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_14.1 [symbolic = %T.loc14_14.2 (constants.%T)]
  303. // CHECK:STDOUT: %I.type.loc14_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc14_32.2 (constants.%I.type.070)]
  304. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  305. // CHECK:STDOUT: %T.loc14_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc14_14.2 (constants.%T)]
  306. // CHECK:STDOUT: }
  307. // CHECK:STDOUT: impl_decl @C.as.I.impl.1fddff.2 [concrete] {
  308. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  309. // CHECK:STDOUT: } {
  310. // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
  311. // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, imports.%Main.I [concrete = constants.%I.generic]
  312. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc20_14.1 [symbolic = %T.loc20_14.2 (constants.%T)]
  313. // CHECK:STDOUT: %ptr.loc20_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc20_32.2 (constants.%ptr)]
  314. // CHECK:STDOUT: %I.type.loc20_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc20_33.2 (constants.%I.type.229)]
  315. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  316. // CHECK:STDOUT: %T.loc20_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc20_14.2 (constants.%T)]
  317. // CHECK:STDOUT: }
  318. // CHECK:STDOUT: impl_decl @C.as.I.impl.1fddff.3 [concrete] {
  319. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  320. // CHECK:STDOUT: } {
  321. // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
  322. // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, imports.%Main.I [concrete = constants.%I.generic]
  323. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc26_14.1 [symbolic = %T.loc26_14.2 (constants.%T)]
  324. // CHECK:STDOUT: %ptr.loc26_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc26_32.2 (constants.%ptr)]
  325. // CHECK:STDOUT: %I.type.loc26_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc26_33.2 (constants.%I.type.229)]
  326. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  327. // CHECK:STDOUT: %T.loc26_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc26_14.2 (constants.%T)]
  328. // CHECK:STDOUT: }
  329. // CHECK:STDOUT: }
  330. // CHECK:STDOUT:
  331. // CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.efcd44.1: type) [from "import_generic.carbon"] {
  332. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  333. // CHECK:STDOUT:
  334. // CHECK:STDOUT: !definition:
  335. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.070)]
  336. // CHECK:STDOUT: %Self: @I.%I.type (%I.type.070) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.269)]
  337. // CHECK:STDOUT:
  338. // CHECK:STDOUT: interface {
  339. // CHECK:STDOUT: !members:
  340. // CHECK:STDOUT: .Self = imports.%Main.import_ref.769
  341. // CHECK:STDOUT: witness = ()
  342. // CHECK:STDOUT:
  343. // CHECK:STDOUT: !requires:
  344. // CHECK:STDOUT: }
  345. // CHECK:STDOUT: }
  346. // CHECK:STDOUT:
  347. // CHECK:STDOUT: generic impl @C.as.I.impl.f3ed6b.1(imports.%Main.import_ref.efcd44.2: type) [from "import_generic.carbon"] {
  348. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  349. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.070)]
  350. // 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)]
  351. // CHECK:STDOUT:
  352. // CHECK:STDOUT: !definition:
  353. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete.c94)]
  354. // CHECK:STDOUT:
  355. // CHECK:STDOUT: impl: imports.%Main.import_ref.29aca8.1 as imports.%Main.import_ref.464 {
  356. // CHECK:STDOUT: !members:
  357. // CHECK:STDOUT: witness = imports.%Main.import_ref.e46
  358. // CHECK:STDOUT: }
  359. // CHECK:STDOUT: }
  360. // CHECK:STDOUT:
  361. // CHECK:STDOUT: generic impl @C.as.I.impl.1fddff.1(imports.%Main.import_ref.efcd44.3: type) [from "import_generic.carbon"] {
  362. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  363. // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic = %ptr (constants.%ptr)]
  364. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%ptr)> [symbolic = %I.type (constants.%I.type.229)]
  365. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete.555)]
  366. // 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)]
  367. // CHECK:STDOUT:
  368. // CHECK:STDOUT: !definition:
  369. // CHECK:STDOUT:
  370. // CHECK:STDOUT: impl: imports.%Main.import_ref.29aca8.2 as imports.%Main.import_ref.7b6 {
  371. // CHECK:STDOUT: !members:
  372. // CHECK:STDOUT: witness = imports.%Main.import_ref.4f8
  373. // CHECK:STDOUT: }
  374. // CHECK:STDOUT: }
  375. // CHECK:STDOUT:
  376. // CHECK:STDOUT: generic impl @C.as.I.impl.f3ed6b.2(%T.loc8_14.1: type) {
  377. // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
  378. // 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)]
  379. // CHECK:STDOUT:
  380. // CHECK:STDOUT: impl: %C.ref as %I.type.loc8_32.1;
  381. // CHECK:STDOUT: }
  382. // CHECK:STDOUT:
  383. // CHECK:STDOUT: generic impl @C.as.I.impl.f3ed6b.3(%T.loc14_14.1: type) {
  384. // CHECK:STDOUT: %T.loc14_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc14_14.2 (constants.%T)]
  385. // 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)]
  386. // CHECK:STDOUT:
  387. // CHECK:STDOUT: !definition:
  388. // CHECK:STDOUT:
  389. // CHECK:STDOUT: impl: %C.ref as %I.type.loc14_32.1 {
  390. // CHECK:STDOUT: !members:
  391. // CHECK:STDOUT: witness = <error>
  392. // CHECK:STDOUT: }
  393. // CHECK:STDOUT: }
  394. // CHECK:STDOUT:
  395. // CHECK:STDOUT: generic impl @C.as.I.impl.1fddff.2(%T.loc20_14.1: type) {
  396. // CHECK:STDOUT: %T.loc20_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc20_14.2 (constants.%T)]
  397. // CHECK:STDOUT: %ptr.loc20_32.2: type = ptr_type %T.loc20_14.2 [symbolic = %ptr.loc20_32.2 (constants.%ptr)]
  398. // 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)]
  399. // CHECK:STDOUT:
  400. // CHECK:STDOUT: impl: %C.ref as %I.type.loc20_33.1;
  401. // CHECK:STDOUT: }
  402. // CHECK:STDOUT:
  403. // CHECK:STDOUT: generic impl @C.as.I.impl.1fddff.3(%T.loc26_14.1: type) {
  404. // CHECK:STDOUT: %T.loc26_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc26_14.2 (constants.%T)]
  405. // CHECK:STDOUT: %ptr.loc26_32.2: type = ptr_type %T.loc26_14.2 [symbolic = %ptr.loc26_32.2 (constants.%ptr)]
  406. // 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)]
  407. // CHECK:STDOUT:
  408. // CHECK:STDOUT: !definition:
  409. // CHECK:STDOUT:
  410. // CHECK:STDOUT: impl: %C.ref as %I.type.loc26_33.1 {
  411. // CHECK:STDOUT: !members:
  412. // CHECK:STDOUT: witness = <error>
  413. // CHECK:STDOUT: }
  414. // CHECK:STDOUT: }
  415. // CHECK:STDOUT:
  416. // CHECK:STDOUT: class @C [from "import_generic.carbon"] {
  417. // CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f2
  418. // CHECK:STDOUT:
  419. // CHECK:STDOUT: !members:
  420. // CHECK:STDOUT: .Self = imports.%Main.import_ref.2c4
  421. // CHECK:STDOUT: }
  422. // CHECK:STDOUT:
  423. // CHECK:STDOUT: specific @I(constants.%T) {
  424. // CHECK:STDOUT: %T => constants.%T
  425. // CHECK:STDOUT:
  426. // CHECK:STDOUT: !definition:
  427. // CHECK:STDOUT: %I.type => constants.%I.type.070
  428. // CHECK:STDOUT: %Self => constants.%Self.269
  429. // CHECK:STDOUT: }
  430. // CHECK:STDOUT:
  431. // CHECK:STDOUT: specific @C.as.I.impl.f3ed6b.1(constants.%T) {
  432. // CHECK:STDOUT: %T => constants.%T
  433. // CHECK:STDOUT: %I.type => constants.%I.type.070
  434. // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.f13
  435. // CHECK:STDOUT: }
  436. // CHECK:STDOUT:
  437. // CHECK:STDOUT: specific @I(constants.%ptr) {
  438. // CHECK:STDOUT: %T => constants.%ptr
  439. // CHECK:STDOUT:
  440. // CHECK:STDOUT: !definition:
  441. // CHECK:STDOUT: %I.type => constants.%I.type.229
  442. // CHECK:STDOUT: %Self => constants.%Self.6d0
  443. // CHECK:STDOUT: }
  444. // CHECK:STDOUT:
  445. // CHECK:STDOUT: specific @C.as.I.impl.1fddff.1(constants.%T) {
  446. // CHECK:STDOUT: %T => constants.%T
  447. // CHECK:STDOUT: %ptr => constants.%ptr
  448. // CHECK:STDOUT: %I.type => constants.%I.type.229
  449. // CHECK:STDOUT: %require_complete => constants.%require_complete.555
  450. // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.a0f
  451. // CHECK:STDOUT: }
  452. // CHECK:STDOUT:
  453. // CHECK:STDOUT: specific @C.as.I.impl.f3ed6b.2(constants.%T) {
  454. // CHECK:STDOUT: %T.loc8_14.2 => constants.%T
  455. // CHECK:STDOUT: %I.type.loc8_32.2 => constants.%I.type.070
  456. // CHECK:STDOUT: }
  457. // CHECK:STDOUT:
  458. // CHECK:STDOUT: specific @C.as.I.impl.f3ed6b.3(constants.%T) {
  459. // CHECK:STDOUT: %T.loc14_14.2 => constants.%T
  460. // CHECK:STDOUT: %I.type.loc14_32.2 => constants.%I.type.070
  461. // CHECK:STDOUT: }
  462. // CHECK:STDOUT:
  463. // CHECK:STDOUT: specific @C.as.I.impl.1fddff.2(constants.%T) {
  464. // CHECK:STDOUT: %T.loc20_14.2 => constants.%T
  465. // CHECK:STDOUT: %ptr.loc20_32.2 => constants.%ptr
  466. // CHECK:STDOUT: %I.type.loc20_33.2 => constants.%I.type.229
  467. // CHECK:STDOUT: }
  468. // CHECK:STDOUT:
  469. // CHECK:STDOUT: specific @C.as.I.impl.1fddff.3(constants.%T) {
  470. // CHECK:STDOUT: %T.loc26_14.2 => constants.%T
  471. // CHECK:STDOUT: %ptr.loc26_32.2 => constants.%ptr
  472. // CHECK:STDOUT: %I.type.loc26_33.2 => constants.%I.type.229
  473. // CHECK:STDOUT: }
  474. // CHECK:STDOUT:
  475. // CHECK:STDOUT: --- fail_import_generic_decl.carbon
  476. // CHECK:STDOUT:
  477. // CHECK:STDOUT: constants {
  478. // CHECK:STDOUT: %D: type = class_type @D [concrete]
  479. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  480. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  481. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  482. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  483. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  484. // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
  485. // CHECK:STDOUT: %J.type.2b8: type = generic_interface_type @J [concrete]
  486. // CHECK:STDOUT: %J.generic: %J.type.2b8 = struct_value () [concrete]
  487. // CHECK:STDOUT: %J.type.8ec: type = facet_type <@J, @J(%T)> [symbolic]
  488. // CHECK:STDOUT: %Self: %J.type.8ec = symbolic_binding Self, 1 [symbolic]
  489. // CHECK:STDOUT: %J.impl_witness.224: <witness> = impl_witness file.%J.impl_witness_table.loc11, @D.as.J.impl.b47(%T) [symbolic]
  490. // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic]
  491. // CHECK:STDOUT: %J.type.4fa: type = facet_type <@J, @J(%ptr)> [symbolic]
  492. // CHECK:STDOUT: %J.impl_witness.537: <witness> = impl_witness file.%J.impl_witness_table.loc17, @D.as.J.impl.265(%T) [symbolic]
  493. // CHECK:STDOUT: }
  494. // CHECK:STDOUT:
  495. // CHECK:STDOUT: file {
  496. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  497. // CHECK:STDOUT: .D = %D.decl
  498. // CHECK:STDOUT: .J = %J.decl
  499. // CHECK:STDOUT: }
  500. // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {}
  501. // CHECK:STDOUT: %J.decl: %J.type.2b8 = interface_decl @J [concrete = constants.%J.generic] {
  502. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  503. // CHECK:STDOUT: } {
  504. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  505. // CHECK:STDOUT: %T.loc5_13.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T)]
  506. // CHECK:STDOUT: }
  507. // CHECK:STDOUT: impl_decl @D.as.J.impl.b47 [concrete] {
  508. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  509. // CHECK:STDOUT: } {
  510. // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
  511. // CHECK:STDOUT: %J.ref: %J.type.2b8 = name_ref J, file.%J.decl [concrete = constants.%J.generic]
  512. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_14.1 [symbolic = %T.loc11_14.2 (constants.%T)]
  513. // CHECK:STDOUT: %J.type.loc11_32.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc11_32.2 (constants.%J.type.8ec)]
  514. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  515. // CHECK:STDOUT: %T.loc11_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc11_14.2 (constants.%T)]
  516. // CHECK:STDOUT: }
  517. // CHECK:STDOUT: %J.impl_witness_table.loc11 = impl_witness_table (), @D.as.J.impl.b47 [concrete]
  518. // 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)]
  519. // CHECK:STDOUT: impl_decl @D.as.J.impl.265 [concrete] {
  520. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  521. // CHECK:STDOUT: } {
  522. // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
  523. // CHECK:STDOUT: %J.ref: %J.type.2b8 = name_ref J, file.%J.decl [concrete = constants.%J.generic]
  524. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc17_14.1 [symbolic = %T.loc17_14.2 (constants.%T)]
  525. // CHECK:STDOUT: %ptr.loc17_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc17_32.2 (constants.%ptr)]
  526. // CHECK:STDOUT: %J.type.loc17_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc17_33.2 (constants.%J.type.4fa)]
  527. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  528. // CHECK:STDOUT: %T.loc17_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc17_14.2 (constants.%T)]
  529. // CHECK:STDOUT: }
  530. // CHECK:STDOUT: %J.impl_witness_table.loc17 = impl_witness_table (), @D.as.J.impl.265 [concrete]
  531. // 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)]
  532. // CHECK:STDOUT: }
  533. // CHECK:STDOUT:
  534. // CHECK:STDOUT: generic interface @J(%T.loc5_13.2: type) {
  535. // CHECK:STDOUT: %T.loc5_13.1: type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T)]
  536. // CHECK:STDOUT:
  537. // CHECK:STDOUT: !definition:
  538. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T.loc5_13.1)> [symbolic = %J.type (constants.%J.type.8ec)]
  539. // CHECK:STDOUT: %Self.loc5_23.2: @J.%J.type (%J.type.8ec) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self)]
  540. // CHECK:STDOUT:
  541. // CHECK:STDOUT: interface {
  542. // CHECK:STDOUT: %Self.loc5_23.1: @J.%J.type (%J.type.8ec) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self)]
  543. // CHECK:STDOUT:
  544. // CHECK:STDOUT: !members:
  545. // CHECK:STDOUT: .Self = %Self.loc5_23.1
  546. // CHECK:STDOUT: witness = ()
  547. // CHECK:STDOUT:
  548. // CHECK:STDOUT: !requires:
  549. // CHECK:STDOUT: }
  550. // CHECK:STDOUT: }
  551. // CHECK:STDOUT:
  552. // CHECK:STDOUT: generic impl @D.as.J.impl.b47(%T.loc11_14.1: type) {
  553. // CHECK:STDOUT: %T.loc11_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc11_14.2 (constants.%T)]
  554. // 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)]
  555. // 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)]
  556. // CHECK:STDOUT:
  557. // CHECK:STDOUT: impl: %D.ref as %J.type.loc11_32.1;
  558. // CHECK:STDOUT: }
  559. // CHECK:STDOUT:
  560. // CHECK:STDOUT: generic impl @D.as.J.impl.265(%T.loc17_14.1: type) {
  561. // CHECK:STDOUT: %T.loc17_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc17_14.2 (constants.%T)]
  562. // CHECK:STDOUT: %ptr.loc17_32.2: type = ptr_type %T.loc17_14.2 [symbolic = %ptr.loc17_32.2 (constants.%ptr)]
  563. // 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)]
  564. // 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)]
  565. // CHECK:STDOUT:
  566. // CHECK:STDOUT: impl: %D.ref as %J.type.loc17_33.1;
  567. // CHECK:STDOUT: }
  568. // CHECK:STDOUT:
  569. // CHECK:STDOUT: class @D {
  570. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  571. // CHECK:STDOUT: complete_type_witness = %complete_type
  572. // CHECK:STDOUT:
  573. // CHECK:STDOUT: !members:
  574. // CHECK:STDOUT: .Self = constants.%D
  575. // CHECK:STDOUT: }
  576. // CHECK:STDOUT:
  577. // CHECK:STDOUT: specific @J(constants.%T) {
  578. // CHECK:STDOUT: %T.loc5_13.1 => constants.%T
  579. // CHECK:STDOUT: }
  580. // CHECK:STDOUT:
  581. // CHECK:STDOUT: specific @D.as.J.impl.b47(constants.%T) {
  582. // CHECK:STDOUT: %T.loc11_14.2 => constants.%T
  583. // CHECK:STDOUT: %J.type.loc11_32.2 => constants.%J.type.8ec
  584. // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.224
  585. // CHECK:STDOUT: }
  586. // CHECK:STDOUT:
  587. // CHECK:STDOUT: specific @J(constants.%ptr) {
  588. // CHECK:STDOUT: %T.loc5_13.1 => constants.%ptr
  589. // CHECK:STDOUT: }
  590. // CHECK:STDOUT:
  591. // CHECK:STDOUT: specific @D.as.J.impl.265(constants.%T) {
  592. // CHECK:STDOUT: %T.loc17_14.2 => constants.%T
  593. // CHECK:STDOUT: %ptr.loc17_32.2 => constants.%ptr
  594. // CHECK:STDOUT: %J.type.loc17_33.2 => constants.%J.type.4fa
  595. // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.537
  596. // CHECK:STDOUT: }
  597. // CHECK:STDOUT:
  598. // CHECK:STDOUT: --- fail_import_generic_decl.impl.carbon
  599. // CHECK:STDOUT:
  600. // CHECK:STDOUT: constants {
  601. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  602. // CHECK:STDOUT: %J.type.2b8: type = generic_interface_type @J [concrete]
  603. // CHECK:STDOUT: %J.generic: %J.type.2b8 = struct_value () [concrete]
  604. // CHECK:STDOUT: %J.type.8ec: type = facet_type <@J, @J(%T)> [symbolic]
  605. // CHECK:STDOUT: %Self: %J.type.8ec = symbolic_binding Self, 1 [symbolic]
  606. // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
  607. // CHECK:STDOUT: %D: type = class_type @D [concrete]
  608. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  609. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  610. // CHECK:STDOUT: %J.impl_witness.224: <witness> = impl_witness imports.%J.impl_witness_table.bc9, @D.as.J.impl.b470bf.1(%T) [symbolic]
  611. // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic]
  612. // CHECK:STDOUT: %J.type.4fa: type = facet_type <@J, @J(%ptr)> [symbolic]
  613. // CHECK:STDOUT: %J.impl_witness.537: <witness> = impl_witness imports.%J.impl_witness_table.bd9, @D.as.J.impl.265db6.1(%T) [symbolic]
  614. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  615. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  616. // CHECK:STDOUT: }
  617. // CHECK:STDOUT:
  618. // CHECK:STDOUT: imports {
  619. // CHECK:STDOUT: %Main.D: type = import_ref Main//import_generic_decl, D, loaded [concrete = constants.%D]
  620. // CHECK:STDOUT: %Main.J: %J.type.2b8 = import_ref Main//import_generic_decl, J, loaded [concrete = constants.%J.generic]
  621. // CHECK:STDOUT: %Main.import_ref.efcd44.1: type = import_ref Main//import_generic_decl, loc5_13, loaded [symbolic = @J.%T (constants.%T)]
  622. // CHECK:STDOUT: %Main.import_ref.b3b = import_ref Main//import_generic_decl, loc5_23, unloaded
  623. // CHECK:STDOUT: %Main.import_ref.8f2: <witness> = import_ref Main//import_generic_decl, loc4_10, loaded [concrete = constants.%complete_type]
  624. // CHECK:STDOUT: %Main.import_ref.cab = import_ref Main//import_generic_decl, inst{{[0-9A-F]+}} [no loc], unloaded
  625. // 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)]
  626. // CHECK:STDOUT: %Main.import_ref.aa9f8a.1: type = import_ref Main//import_generic_decl, loc11_24, loaded [concrete = constants.%D]
  627. // 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)]
  628. // CHECK:STDOUT: %J.impl_witness_table.bc9 = impl_witness_table (), @D.as.J.impl.b470bf.1 [concrete]
  629. // 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)]
  630. // CHECK:STDOUT: %Main.import_ref.aa9f8a.2: type = import_ref Main//import_generic_decl, loc17_24, loaded [concrete = constants.%D]
  631. // 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)]
  632. // CHECK:STDOUT: %J.impl_witness_table.bd9 = impl_witness_table (), @D.as.J.impl.265db6.1 [concrete]
  633. // CHECK:STDOUT: }
  634. // CHECK:STDOUT:
  635. // CHECK:STDOUT: file {
  636. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  637. // CHECK:STDOUT: .D = imports.%Main.D
  638. // CHECK:STDOUT: .J = imports.%Main.J
  639. // CHECK:STDOUT: }
  640. // CHECK:STDOUT: %default.import.loc2_35.1 = import <none>
  641. // CHECK:STDOUT: %default.import.loc2_35.2 = import <none>
  642. // CHECK:STDOUT: impl_decl @D.as.J.impl.b470bf.2 [concrete] {
  643. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  644. // CHECK:STDOUT: } {
  645. // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D]
  646. // CHECK:STDOUT: %J.ref: %J.type.2b8 = name_ref J, imports.%Main.J [concrete = constants.%J.generic]
  647. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)]
  648. // CHECK:STDOUT: %J.type.loc8_32.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc8_32.2 (constants.%J.type.8ec)]
  649. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  650. // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
  651. // CHECK:STDOUT: }
  652. // CHECK:STDOUT: impl_decl @D.as.J.impl.b470bf.3 [concrete] {
  653. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  654. // CHECK:STDOUT: } {
  655. // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D]
  656. // CHECK:STDOUT: %J.ref: %J.type.2b8 = name_ref J, imports.%Main.J [concrete = constants.%J.generic]
  657. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_14.1 [symbolic = %T.loc14_14.2 (constants.%T)]
  658. // CHECK:STDOUT: %J.type.loc14_32.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc14_32.2 (constants.%J.type.8ec)]
  659. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  660. // CHECK:STDOUT: %T.loc14_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc14_14.2 (constants.%T)]
  661. // CHECK:STDOUT: }
  662. // CHECK:STDOUT: impl_decl @D.as.J.impl.265db6.2 [concrete] {
  663. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  664. // CHECK:STDOUT: } {
  665. // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D]
  666. // CHECK:STDOUT: %J.ref: %J.type.2b8 = name_ref J, imports.%Main.J [concrete = constants.%J.generic]
  667. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc20_14.1 [symbolic = %T.loc20_14.2 (constants.%T)]
  668. // CHECK:STDOUT: %ptr.loc20_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc20_32.2 (constants.%ptr)]
  669. // CHECK:STDOUT: %J.type.loc20_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc20_33.2 (constants.%J.type.4fa)]
  670. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  671. // CHECK:STDOUT: %T.loc20_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc20_14.2 (constants.%T)]
  672. // CHECK:STDOUT: }
  673. // CHECK:STDOUT: impl_decl @D.as.J.impl.265db6.3 [concrete] {
  674. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  675. // CHECK:STDOUT: } {
  676. // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D]
  677. // CHECK:STDOUT: %J.ref: %J.type.2b8 = name_ref J, imports.%Main.J [concrete = constants.%J.generic]
  678. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc26_14.1 [symbolic = %T.loc26_14.2 (constants.%T)]
  679. // CHECK:STDOUT: %ptr.loc26_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc26_32.2 (constants.%ptr)]
  680. // CHECK:STDOUT: %J.type.loc26_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc26_33.2 (constants.%J.type.4fa)]
  681. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  682. // CHECK:STDOUT: %T.loc26_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc26_14.2 (constants.%T)]
  683. // CHECK:STDOUT: }
  684. // CHECK:STDOUT: }
  685. // CHECK:STDOUT:
  686. // CHECK:STDOUT: generic interface @J(imports.%Main.import_ref.efcd44.1: type) [from "fail_import_generic_decl.carbon"] {
  687. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  688. // CHECK:STDOUT:
  689. // CHECK:STDOUT: !definition:
  690. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.8ec)]
  691. // CHECK:STDOUT: %Self: @J.%J.type (%J.type.8ec) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)]
  692. // CHECK:STDOUT:
  693. // CHECK:STDOUT: interface {
  694. // CHECK:STDOUT: !members:
  695. // CHECK:STDOUT: .Self = imports.%Main.import_ref.b3b
  696. // CHECK:STDOUT: witness = ()
  697. // CHECK:STDOUT:
  698. // CHECK:STDOUT: !requires:
  699. // CHECK:STDOUT: }
  700. // CHECK:STDOUT: }
  701. // CHECK:STDOUT:
  702. // CHECK:STDOUT: generic impl @D.as.J.impl.b470bf.1(imports.%Main.import_ref.efcd44.2: type) [from "fail_import_generic_decl.carbon"] {
  703. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  704. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.8ec)]
  705. // 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)]
  706. // CHECK:STDOUT:
  707. // CHECK:STDOUT: impl: imports.%Main.import_ref.aa9f8a.1 as imports.%Main.import_ref.03f;
  708. // CHECK:STDOUT: }
  709. // CHECK:STDOUT:
  710. // CHECK:STDOUT: generic impl @D.as.J.impl.265db6.1(imports.%Main.import_ref.efcd44.3: type) [from "fail_import_generic_decl.carbon"] {
  711. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  712. // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic = %ptr (constants.%ptr)]
  713. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%ptr)> [symbolic = %J.type (constants.%J.type.4fa)]
  714. // 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)]
  715. // CHECK:STDOUT:
  716. // CHECK:STDOUT: impl: imports.%Main.import_ref.aa9f8a.2 as imports.%Main.import_ref.a00;
  717. // CHECK:STDOUT: }
  718. // CHECK:STDOUT:
  719. // CHECK:STDOUT: generic impl @D.as.J.impl.b470bf.2(%T.loc8_14.1: type) {
  720. // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
  721. // 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)]
  722. // CHECK:STDOUT:
  723. // CHECK:STDOUT: impl: %D.ref as %J.type.loc8_32.1;
  724. // CHECK:STDOUT: }
  725. // CHECK:STDOUT:
  726. // CHECK:STDOUT: generic impl @D.as.J.impl.b470bf.3(%T.loc14_14.1: type) {
  727. // CHECK:STDOUT: %T.loc14_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc14_14.2 (constants.%T)]
  728. // 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)]
  729. // CHECK:STDOUT:
  730. // CHECK:STDOUT: !definition:
  731. // CHECK:STDOUT:
  732. // CHECK:STDOUT: impl: %D.ref as %J.type.loc14_32.1 {
  733. // CHECK:STDOUT: !members:
  734. // CHECK:STDOUT: witness = <error>
  735. // CHECK:STDOUT: }
  736. // CHECK:STDOUT: }
  737. // CHECK:STDOUT:
  738. // CHECK:STDOUT: generic impl @D.as.J.impl.265db6.2(%T.loc20_14.1: type) {
  739. // CHECK:STDOUT: %T.loc20_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc20_14.2 (constants.%T)]
  740. // CHECK:STDOUT: %ptr.loc20_32.2: type = ptr_type %T.loc20_14.2 [symbolic = %ptr.loc20_32.2 (constants.%ptr)]
  741. // 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)]
  742. // CHECK:STDOUT:
  743. // CHECK:STDOUT: impl: %D.ref as %J.type.loc20_33.1;
  744. // CHECK:STDOUT: }
  745. // CHECK:STDOUT:
  746. // CHECK:STDOUT: generic impl @D.as.J.impl.265db6.3(%T.loc26_14.1: type) {
  747. // CHECK:STDOUT: %T.loc26_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc26_14.2 (constants.%T)]
  748. // CHECK:STDOUT: %ptr.loc26_32.2: type = ptr_type %T.loc26_14.2 [symbolic = %ptr.loc26_32.2 (constants.%ptr)]
  749. // 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)]
  750. // CHECK:STDOUT:
  751. // CHECK:STDOUT: !definition:
  752. // CHECK:STDOUT:
  753. // CHECK:STDOUT: impl: %D.ref as %J.type.loc26_33.1 {
  754. // CHECK:STDOUT: !members:
  755. // CHECK:STDOUT: witness = <error>
  756. // CHECK:STDOUT: }
  757. // CHECK:STDOUT: }
  758. // CHECK:STDOUT:
  759. // CHECK:STDOUT: class @D [from "fail_import_generic_decl.carbon"] {
  760. // CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f2
  761. // CHECK:STDOUT:
  762. // CHECK:STDOUT: !members:
  763. // CHECK:STDOUT: .Self = imports.%Main.import_ref.cab
  764. // CHECK:STDOUT: }
  765. // CHECK:STDOUT:
  766. // CHECK:STDOUT: specific @J(constants.%T) {
  767. // CHECK:STDOUT: %T => constants.%T
  768. // CHECK:STDOUT: }
  769. // CHECK:STDOUT:
  770. // CHECK:STDOUT: specific @D.as.J.impl.b470bf.1(constants.%T) {
  771. // CHECK:STDOUT: %T => constants.%T
  772. // CHECK:STDOUT: %J.type => constants.%J.type.8ec
  773. // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.224
  774. // CHECK:STDOUT: }
  775. // CHECK:STDOUT:
  776. // CHECK:STDOUT: specific @J(constants.%ptr) {
  777. // CHECK:STDOUT: %T => constants.%ptr
  778. // CHECK:STDOUT: }
  779. // CHECK:STDOUT:
  780. // CHECK:STDOUT: specific @D.as.J.impl.265db6.1(constants.%T) {
  781. // CHECK:STDOUT: %T => constants.%T
  782. // CHECK:STDOUT: %ptr => constants.%ptr
  783. // CHECK:STDOUT: %J.type => constants.%J.type.4fa
  784. // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.537
  785. // CHECK:STDOUT: }
  786. // CHECK:STDOUT:
  787. // CHECK:STDOUT: specific @D.as.J.impl.b470bf.2(constants.%T) {
  788. // CHECK:STDOUT: %T.loc8_14.2 => constants.%T
  789. // CHECK:STDOUT: %J.type.loc8_32.2 => constants.%J.type.8ec
  790. // CHECK:STDOUT: }
  791. // CHECK:STDOUT:
  792. // CHECK:STDOUT: specific @D.as.J.impl.b470bf.3(constants.%T) {
  793. // CHECK:STDOUT: %T.loc14_14.2 => constants.%T
  794. // CHECK:STDOUT: %J.type.loc14_32.2 => constants.%J.type.8ec
  795. // CHECK:STDOUT: }
  796. // CHECK:STDOUT:
  797. // CHECK:STDOUT: specific @D.as.J.impl.265db6.2(constants.%T) {
  798. // CHECK:STDOUT: %T.loc20_14.2 => constants.%T
  799. // CHECK:STDOUT: %ptr.loc20_32.2 => constants.%ptr
  800. // CHECK:STDOUT: %J.type.loc20_33.2 => constants.%J.type.4fa
  801. // CHECK:STDOUT: }
  802. // CHECK:STDOUT:
  803. // CHECK:STDOUT: specific @D.as.J.impl.265db6.3(constants.%T) {
  804. // CHECK:STDOUT: %T.loc26_14.2 => constants.%T
  805. // CHECK:STDOUT: %ptr.loc26_32.2 => constants.%ptr
  806. // CHECK:STDOUT: %J.type.loc26_33.2 => constants.%J.type.4fa
  807. // CHECK:STDOUT: }
  808. // CHECK:STDOUT: