import_generic.carbon 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823
  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 = bind_symbolic_name .Self [symbolic_self]
  89. // CHECK:STDOUT: %T: type = bind_symbolic_name 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.b13: type = facet_type <@I, @I(%T)> [symbolic]
  94. // CHECK:STDOUT: %Self.dae: %I.type.b13 = bind_symbolic_name Self, 1 [symbolic]
  95. // CHECK:STDOUT: %I.impl_witness.be0: <witness> = impl_witness file.%I.impl_witness_table.loc8, @C.as.I.impl.c17(%T) [symbolic]
  96. // CHECK:STDOUT: %require_complete.00d: <witness> = require_complete_type %I.type.b13 [symbolic]
  97. // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic]
  98. // CHECK:STDOUT: %I.type.b8f: type = facet_type <@I, @I(%ptr)> [symbolic]
  99. // CHECK:STDOUT: %Self.b9d: %I.type.b8f = bind_symbolic_name Self, 1 [symbolic]
  100. // CHECK:STDOUT: %require_complete.436: <witness> = require_complete_type %I.type.b8f [symbolic]
  101. // CHECK:STDOUT: %I.impl_witness.2ad: <witness> = impl_witness file.%I.impl_witness_table.loc12, @C.as.I.impl.040(%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 = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  114. // CHECK:STDOUT: %T.loc5_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_13.1 (constants.%T)]
  115. // CHECK:STDOUT: }
  116. // CHECK:STDOUT: impl_decl @C.as.I.impl.c17 [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.b13)]
  123. // CHECK:STDOUT: %.Self.2: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  124. // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name 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.c17 [concrete]
  127. // CHECK:STDOUT: %I.impl_witness.loc8: <witness> = impl_witness %I.impl_witness_table.loc8, @C.as.I.impl.c17(constants.%T) [symbolic = @C.as.I.impl.c17.%I.impl_witness (constants.%I.impl_witness.be0)]
  128. // CHECK:STDOUT: impl_decl @C.as.I.impl.c17 [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.b13)]
  135. // CHECK:STDOUT: %.Self.1: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  136. // CHECK:STDOUT: %T.loc9: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
  137. // CHECK:STDOUT: }
  138. // CHECK:STDOUT: impl_decl @C.as.I.impl.040 [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.b8f)]
  146. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  147. // CHECK:STDOUT: %T.loc12_14.1: type = bind_symbolic_name 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.040 [concrete]
  150. // CHECK:STDOUT: %I.impl_witness.loc12: <witness> = impl_witness %I.impl_witness_table.loc12, @C.as.I.impl.040(constants.%T) [symbolic = @C.as.I.impl.040.%I.impl_witness (constants.%I.impl_witness.2ad)]
  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 = bind_symbolic_name 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.b13)]
  158. // CHECK:STDOUT: %Self.2: @I.%I.type (%I.type.b13) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.dae)]
  159. // CHECK:STDOUT:
  160. // CHECK:STDOUT: interface {
  161. // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.b13) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.dae)]
  162. // CHECK:STDOUT:
  163. // CHECK:STDOUT: !members:
  164. // CHECK:STDOUT: .Self = %Self.1
  165. // CHECK:STDOUT: witness = ()
  166. // CHECK:STDOUT: }
  167. // CHECK:STDOUT: }
  168. // CHECK:STDOUT:
  169. // CHECK:STDOUT: generic impl @C.as.I.impl.c17(%T.loc8_14.1: type) {
  170. // CHECK:STDOUT: %T.loc8_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
  171. // 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.b13)]
  172. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness file.%I.impl_witness_table.loc8, @C.as.I.impl.c17(%T.loc8_14.2) [symbolic = %I.impl_witness (constants.%I.impl_witness.be0)]
  173. // CHECK:STDOUT:
  174. // CHECK:STDOUT: !definition:
  175. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type.loc8_32.2 [symbolic = %require_complete (constants.%require_complete.00d)]
  176. // CHECK:STDOUT:
  177. // CHECK:STDOUT: impl: %C.ref.loc8 as %I.type.loc8_32.1 {
  178. // CHECK:STDOUT: !members:
  179. // CHECK:STDOUT: witness = file.%I.impl_witness.loc8
  180. // CHECK:STDOUT: }
  181. // CHECK:STDOUT: }
  182. // CHECK:STDOUT:
  183. // CHECK:STDOUT: generic impl @C.as.I.impl.040(%T.loc12_14.1: type) {
  184. // CHECK:STDOUT: %T.loc12_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc12_14.2 (constants.%T)]
  185. // CHECK:STDOUT: %ptr.loc12_32.2: type = ptr_type %T.loc12_14.2 [symbolic = %ptr.loc12_32.2 (constants.%ptr)]
  186. // 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.b8f)]
  187. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type.loc12_33.2 [symbolic = %require_complete (constants.%require_complete.436)]
  188. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness file.%I.impl_witness_table.loc12, @C.as.I.impl.040(%T.loc12_14.2) [symbolic = %I.impl_witness (constants.%I.impl_witness.2ad)]
  189. // CHECK:STDOUT:
  190. // CHECK:STDOUT: !definition:
  191. // CHECK:STDOUT:
  192. // CHECK:STDOUT: impl: %C.ref as %I.type.loc12_33.1 {
  193. // CHECK:STDOUT: !members:
  194. // CHECK:STDOUT: witness = file.%I.impl_witness.loc12
  195. // CHECK:STDOUT: }
  196. // CHECK:STDOUT: }
  197. // CHECK:STDOUT:
  198. // CHECK:STDOUT: class @C {
  199. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  200. // CHECK:STDOUT: complete_type_witness = %complete_type
  201. // CHECK:STDOUT:
  202. // CHECK:STDOUT: !members:
  203. // CHECK:STDOUT: .Self = constants.%C
  204. // CHECK:STDOUT: }
  205. // CHECK:STDOUT:
  206. // CHECK:STDOUT: specific @I(constants.%T) {
  207. // CHECK:STDOUT: %T.loc5_13.1 => constants.%T
  208. // CHECK:STDOUT:
  209. // CHECK:STDOUT: !definition:
  210. // CHECK:STDOUT: %I.type => constants.%I.type.b13
  211. // CHECK:STDOUT: %Self.2 => constants.%Self.dae
  212. // CHECK:STDOUT: }
  213. // CHECK:STDOUT:
  214. // CHECK:STDOUT: specific @C.as.I.impl.c17(constants.%T) {
  215. // CHECK:STDOUT: %T.loc8_14.2 => constants.%T
  216. // CHECK:STDOUT: %I.type.loc8_32.2 => constants.%I.type.b13
  217. // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.be0
  218. // CHECK:STDOUT: }
  219. // CHECK:STDOUT:
  220. // CHECK:STDOUT: specific @I(constants.%ptr) {
  221. // CHECK:STDOUT: %T.loc5_13.1 => constants.%ptr
  222. // CHECK:STDOUT:
  223. // CHECK:STDOUT: !definition:
  224. // CHECK:STDOUT: %I.type => constants.%I.type.b8f
  225. // CHECK:STDOUT: %Self.2 => constants.%Self.b9d
  226. // CHECK:STDOUT: }
  227. // CHECK:STDOUT:
  228. // CHECK:STDOUT: specific @C.as.I.impl.040(constants.%T) {
  229. // CHECK:STDOUT: %T.loc12_14.2 => constants.%T
  230. // CHECK:STDOUT: %ptr.loc12_32.2 => constants.%ptr
  231. // CHECK:STDOUT: %I.type.loc12_33.2 => constants.%I.type.b8f
  232. // CHECK:STDOUT: %require_complete => constants.%require_complete.436
  233. // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.2ad
  234. // CHECK:STDOUT: }
  235. // CHECK:STDOUT:
  236. // CHECK:STDOUT: --- fail_import_generic.impl.carbon
  237. // CHECK:STDOUT:
  238. // CHECK:STDOUT: constants {
  239. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  240. // CHECK:STDOUT: %I.type.dac: type = generic_interface_type @I [concrete]
  241. // CHECK:STDOUT: %I.generic: %I.type.dac = struct_value () [concrete]
  242. // CHECK:STDOUT: %I.type.b13: type = facet_type <@I, @I(%T)> [symbolic]
  243. // CHECK:STDOUT: %Self.dae: %I.type.b13 = bind_symbolic_name Self, 1 [symbolic]
  244. // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
  245. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  246. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  247. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  248. // CHECK:STDOUT: %I.impl_witness.be0: <witness> = impl_witness imports.%I.impl_witness_table.838, @C.as.I.impl.c17be4.1(%T) [symbolic]
  249. // CHECK:STDOUT: %require_complete.00d: <witness> = require_complete_type %I.type.b13 [symbolic]
  250. // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic]
  251. // CHECK:STDOUT: %I.type.b8f: type = facet_type <@I, @I(%ptr)> [symbolic]
  252. // CHECK:STDOUT: %require_complete.436: <witness> = require_complete_type %I.type.b8f [symbolic]
  253. // CHECK:STDOUT: %I.impl_witness.2ad: <witness> = impl_witness imports.%I.impl_witness_table.e6b, @C.as.I.impl.0406af.1(%T) [symbolic]
  254. // CHECK:STDOUT: %Self.b9d: %I.type.b8f = bind_symbolic_name Self, 1 [symbolic]
  255. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  256. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self]
  257. // CHECK:STDOUT: }
  258. // CHECK:STDOUT:
  259. // CHECK:STDOUT: imports {
  260. // CHECK:STDOUT: %Main.C: type = import_ref Main//import_generic, C, loaded [concrete = constants.%C]
  261. // CHECK:STDOUT: %Main.I: %I.type.dac = import_ref Main//import_generic, I, loaded [concrete = constants.%I.generic]
  262. // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//import_generic, loc5_13, loaded [symbolic = @I.%T (constants.%T)]
  263. // CHECK:STDOUT: %Main.import_ref.eee = import_ref Main//import_generic, inst{{[0-9A-F]+}} [no loc], unloaded
  264. // CHECK:STDOUT: %Main.import_ref.e9d = import_ref Main//import_generic, loc8_33, unloaded
  265. // CHECK:STDOUT: %Main.import_ref.8f2: <witness> = import_ref Main//import_generic, loc4_10, loaded [concrete = constants.%complete_type]
  266. // CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//import_generic, inst{{[0-9A-F]+}} [no loc], unloaded
  267. // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//import_generic, loc8_14, loaded [symbolic = @C.as.I.impl.c17be4.1.%T (constants.%T)]
  268. // CHECK:STDOUT: %Main.import_ref.29aca8.1: type = import_ref Main//import_generic, loc8_24, loaded [concrete = constants.%C]
  269. // CHECK:STDOUT: %Main.import_ref.11c: type = import_ref Main//import_generic, loc8_32, loaded [symbolic = @C.as.I.impl.c17be4.1.%I.type (constants.%I.type.b13)]
  270. // CHECK:STDOUT: %I.impl_witness_table.838 = impl_witness_table (), @C.as.I.impl.c17be4.1 [concrete]
  271. // CHECK:STDOUT: %Main.import_ref.350 = import_ref Main//import_generic, loc12_35, unloaded
  272. // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//import_generic, loc12_14, loaded [symbolic = @C.as.I.impl.0406af.1.%T (constants.%T)]
  273. // CHECK:STDOUT: %Main.import_ref.29aca8.2: type = import_ref Main//import_generic, loc12_24, loaded [concrete = constants.%C]
  274. // CHECK:STDOUT: %Main.import_ref.70c: type = import_ref Main//import_generic, loc12_33, loaded [symbolic = @C.as.I.impl.0406af.1.%I.type (constants.%I.type.b8f)]
  275. // CHECK:STDOUT: %I.impl_witness_table.e6b = impl_witness_table (), @C.as.I.impl.0406af.1 [concrete]
  276. // CHECK:STDOUT: }
  277. // CHECK:STDOUT:
  278. // CHECK:STDOUT: file {
  279. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  280. // CHECK:STDOUT: .C = imports.%Main.C
  281. // CHECK:STDOUT: .I = imports.%Main.I
  282. // CHECK:STDOUT: }
  283. // CHECK:STDOUT: %default.import.loc2_30.1 = import <none>
  284. // CHECK:STDOUT: %default.import.loc2_30.2 = import <none>
  285. // CHECK:STDOUT: impl_decl @C.as.I.impl.c17be4.2 [concrete] {
  286. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  287. // CHECK:STDOUT: } {
  288. // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
  289. // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, imports.%Main.I [concrete = constants.%I.generic]
  290. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)]
  291. // CHECK:STDOUT: %I.type.loc8_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc8_32.2 (constants.%I.type.b13)]
  292. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  293. // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
  294. // CHECK:STDOUT: }
  295. // CHECK:STDOUT: impl_decl @C.as.I.impl.c17be4.3 [concrete] {
  296. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  297. // CHECK:STDOUT: } {
  298. // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
  299. // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, imports.%Main.I [concrete = constants.%I.generic]
  300. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_14.1 [symbolic = %T.loc14_14.2 (constants.%T)]
  301. // CHECK:STDOUT: %I.type.loc14_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc14_32.2 (constants.%I.type.b13)]
  302. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  303. // CHECK:STDOUT: %T.loc14_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_14.2 (constants.%T)]
  304. // CHECK:STDOUT: }
  305. // CHECK:STDOUT: impl_decl @C.as.I.impl.0406af.2 [concrete] {
  306. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  307. // CHECK:STDOUT: } {
  308. // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
  309. // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, imports.%Main.I [concrete = constants.%I.generic]
  310. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc20_14.1 [symbolic = %T.loc20_14.2 (constants.%T)]
  311. // CHECK:STDOUT: %ptr.loc20_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc20_32.2 (constants.%ptr)]
  312. // CHECK:STDOUT: %I.type.loc20_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc20_33.2 (constants.%I.type.b8f)]
  313. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  314. // CHECK:STDOUT: %T.loc20_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc20_14.2 (constants.%T)]
  315. // CHECK:STDOUT: }
  316. // CHECK:STDOUT: impl_decl @C.as.I.impl.0406af.3 [concrete] {
  317. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  318. // CHECK:STDOUT: } {
  319. // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
  320. // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, imports.%Main.I [concrete = constants.%I.generic]
  321. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc26_14.1 [symbolic = %T.loc26_14.2 (constants.%T)]
  322. // CHECK:STDOUT: %ptr.loc26_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc26_32.2 (constants.%ptr)]
  323. // CHECK:STDOUT: %I.type.loc26_33.1: type = facet_type <@I, @I(constants.%ptr)> [symbolic = %I.type.loc26_33.2 (constants.%I.type.b8f)]
  324. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  325. // CHECK:STDOUT: %T.loc26_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc26_14.2 (constants.%T)]
  326. // CHECK:STDOUT: }
  327. // CHECK:STDOUT: }
  328. // CHECK:STDOUT:
  329. // CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.5ab3ec.1: type) [from "import_generic.carbon"] {
  330. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  331. // CHECK:STDOUT:
  332. // CHECK:STDOUT: !definition:
  333. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.b13)]
  334. // CHECK:STDOUT: %Self: @I.%I.type (%I.type.b13) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.dae)]
  335. // CHECK:STDOUT:
  336. // CHECK:STDOUT: interface {
  337. // CHECK:STDOUT: !members:
  338. // CHECK:STDOUT: .Self = imports.%Main.import_ref.eee
  339. // CHECK:STDOUT: witness = ()
  340. // CHECK:STDOUT: }
  341. // CHECK:STDOUT: }
  342. // CHECK:STDOUT:
  343. // CHECK:STDOUT: generic impl @C.as.I.impl.c17be4.1(imports.%Main.import_ref.5ab3ec.2: type) [from "import_generic.carbon"] {
  344. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  345. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.b13)]
  346. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness imports.%I.impl_witness_table.838, @C.as.I.impl.c17be4.1(%T) [symbolic = %I.impl_witness (constants.%I.impl_witness.be0)]
  347. // CHECK:STDOUT:
  348. // CHECK:STDOUT: !definition:
  349. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete.00d)]
  350. // CHECK:STDOUT:
  351. // CHECK:STDOUT: impl: imports.%Main.import_ref.29aca8.1 as imports.%Main.import_ref.11c {
  352. // CHECK:STDOUT: !members:
  353. // CHECK:STDOUT: witness = imports.%Main.import_ref.e9d
  354. // CHECK:STDOUT: }
  355. // CHECK:STDOUT: }
  356. // CHECK:STDOUT:
  357. // CHECK:STDOUT: generic impl @C.as.I.impl.0406af.1(imports.%Main.import_ref.5ab3ec.3: type) [from "import_generic.carbon"] {
  358. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  359. // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic = %ptr (constants.%ptr)]
  360. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%ptr)> [symbolic = %I.type (constants.%I.type.b8f)]
  361. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete.436)]
  362. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness imports.%I.impl_witness_table.e6b, @C.as.I.impl.0406af.1(%T) [symbolic = %I.impl_witness (constants.%I.impl_witness.2ad)]
  363. // CHECK:STDOUT:
  364. // CHECK:STDOUT: !definition:
  365. // CHECK:STDOUT:
  366. // CHECK:STDOUT: impl: imports.%Main.import_ref.29aca8.2 as imports.%Main.import_ref.70c {
  367. // CHECK:STDOUT: !members:
  368. // CHECK:STDOUT: witness = imports.%Main.import_ref.350
  369. // CHECK:STDOUT: }
  370. // CHECK:STDOUT: }
  371. // CHECK:STDOUT:
  372. // CHECK:STDOUT: generic impl @C.as.I.impl.c17be4.2(%T.loc8_14.1: type) {
  373. // CHECK:STDOUT: %T.loc8_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
  374. // 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.b13)]
  375. // CHECK:STDOUT:
  376. // CHECK:STDOUT: impl: %C.ref as %I.type.loc8_32.1;
  377. // CHECK:STDOUT: }
  378. // CHECK:STDOUT:
  379. // CHECK:STDOUT: generic impl @C.as.I.impl.c17be4.3(%T.loc14_14.1: type) {
  380. // CHECK:STDOUT: %T.loc14_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_14.2 (constants.%T)]
  381. // 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.b13)]
  382. // CHECK:STDOUT:
  383. // CHECK:STDOUT: !definition:
  384. // CHECK:STDOUT:
  385. // CHECK:STDOUT: impl: %C.ref as %I.type.loc14_32.1 {
  386. // CHECK:STDOUT: !members:
  387. // CHECK:STDOUT: witness = <error>
  388. // CHECK:STDOUT: }
  389. // CHECK:STDOUT: }
  390. // CHECK:STDOUT:
  391. // CHECK:STDOUT: generic impl @C.as.I.impl.0406af.2(%T.loc20_14.1: type) {
  392. // CHECK:STDOUT: %T.loc20_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc20_14.2 (constants.%T)]
  393. // CHECK:STDOUT: %ptr.loc20_32.2: type = ptr_type %T.loc20_14.2 [symbolic = %ptr.loc20_32.2 (constants.%ptr)]
  394. // 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.b8f)]
  395. // CHECK:STDOUT:
  396. // CHECK:STDOUT: impl: %C.ref as %I.type.loc20_33.1;
  397. // CHECK:STDOUT: }
  398. // CHECK:STDOUT:
  399. // CHECK:STDOUT: generic impl @C.as.I.impl.0406af.3(%T.loc26_14.1: type) {
  400. // CHECK:STDOUT: %T.loc26_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc26_14.2 (constants.%T)]
  401. // CHECK:STDOUT: %ptr.loc26_32.2: type = ptr_type %T.loc26_14.2 [symbolic = %ptr.loc26_32.2 (constants.%ptr)]
  402. // 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.b8f)]
  403. // CHECK:STDOUT:
  404. // CHECK:STDOUT: !definition:
  405. // CHECK:STDOUT:
  406. // CHECK:STDOUT: impl: %C.ref as %I.type.loc26_33.1 {
  407. // CHECK:STDOUT: !members:
  408. // CHECK:STDOUT: witness = <error>
  409. // CHECK:STDOUT: }
  410. // CHECK:STDOUT: }
  411. // CHECK:STDOUT:
  412. // CHECK:STDOUT: class @C [from "import_generic.carbon"] {
  413. // CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f2
  414. // CHECK:STDOUT:
  415. // CHECK:STDOUT: !members:
  416. // CHECK:STDOUT: .Self = imports.%Main.import_ref.2c4
  417. // CHECK:STDOUT: }
  418. // CHECK:STDOUT:
  419. // CHECK:STDOUT: specific @I(constants.%T) {
  420. // CHECK:STDOUT: %T => constants.%T
  421. // CHECK:STDOUT:
  422. // CHECK:STDOUT: !definition:
  423. // CHECK:STDOUT: %I.type => constants.%I.type.b13
  424. // CHECK:STDOUT: %Self => constants.%Self.dae
  425. // CHECK:STDOUT: }
  426. // CHECK:STDOUT:
  427. // CHECK:STDOUT: specific @C.as.I.impl.c17be4.1(constants.%T) {
  428. // CHECK:STDOUT: %T => constants.%T
  429. // CHECK:STDOUT: %I.type => constants.%I.type.b13
  430. // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.be0
  431. // CHECK:STDOUT: }
  432. // CHECK:STDOUT:
  433. // CHECK:STDOUT: specific @I(constants.%ptr) {
  434. // CHECK:STDOUT: %T => constants.%ptr
  435. // CHECK:STDOUT:
  436. // CHECK:STDOUT: !definition:
  437. // CHECK:STDOUT: %I.type => constants.%I.type.b8f
  438. // CHECK:STDOUT: %Self => constants.%Self.b9d
  439. // CHECK:STDOUT: }
  440. // CHECK:STDOUT:
  441. // CHECK:STDOUT: specific @C.as.I.impl.0406af.1(constants.%T) {
  442. // CHECK:STDOUT: %T => constants.%T
  443. // CHECK:STDOUT: %ptr => constants.%ptr
  444. // CHECK:STDOUT: %I.type => constants.%I.type.b8f
  445. // CHECK:STDOUT: %require_complete => constants.%require_complete.436
  446. // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.2ad
  447. // CHECK:STDOUT: }
  448. // CHECK:STDOUT:
  449. // CHECK:STDOUT: specific @C.as.I.impl.c17be4.2(constants.%T) {
  450. // CHECK:STDOUT: %T.loc8_14.2 => constants.%T
  451. // CHECK:STDOUT: %I.type.loc8_32.2 => constants.%I.type.b13
  452. // CHECK:STDOUT: }
  453. // CHECK:STDOUT:
  454. // CHECK:STDOUT: specific @C.as.I.impl.c17be4.3(constants.%T) {
  455. // CHECK:STDOUT: %T.loc14_14.2 => constants.%T
  456. // CHECK:STDOUT: %I.type.loc14_32.2 => constants.%I.type.b13
  457. // CHECK:STDOUT: }
  458. // CHECK:STDOUT:
  459. // CHECK:STDOUT: specific @C.as.I.impl.0406af.2(constants.%T) {
  460. // CHECK:STDOUT: %T.loc20_14.2 => constants.%T
  461. // CHECK:STDOUT: %ptr.loc20_32.2 => constants.%ptr
  462. // CHECK:STDOUT: %I.type.loc20_33.2 => constants.%I.type.b8f
  463. // CHECK:STDOUT: }
  464. // CHECK:STDOUT:
  465. // CHECK:STDOUT: specific @C.as.I.impl.0406af.3(constants.%T) {
  466. // CHECK:STDOUT: %T.loc26_14.2 => constants.%T
  467. // CHECK:STDOUT: %ptr.loc26_32.2 => constants.%ptr
  468. // CHECK:STDOUT: %I.type.loc26_33.2 => constants.%I.type.b8f
  469. // CHECK:STDOUT: }
  470. // CHECK:STDOUT:
  471. // CHECK:STDOUT: --- fail_import_generic_decl.carbon
  472. // CHECK:STDOUT:
  473. // CHECK:STDOUT: constants {
  474. // CHECK:STDOUT: %D: type = class_type @D [concrete]
  475. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  476. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  477. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  478. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self]
  479. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  480. // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
  481. // CHECK:STDOUT: %J.type.2b8: type = generic_interface_type @J [concrete]
  482. // CHECK:STDOUT: %J.generic: %J.type.2b8 = struct_value () [concrete]
  483. // CHECK:STDOUT: %J.type.8a0: type = facet_type <@J, @J(%T)> [symbolic]
  484. // CHECK:STDOUT: %Self: %J.type.8a0 = bind_symbolic_name Self, 1 [symbolic]
  485. // CHECK:STDOUT: %J.impl_witness.d8b: <witness> = impl_witness file.%J.impl_witness_table.loc11, @D.as.J.impl.bff(%T) [symbolic]
  486. // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic]
  487. // CHECK:STDOUT: %J.type.f32: type = facet_type <@J, @J(%ptr)> [symbolic]
  488. // CHECK:STDOUT: %J.impl_witness.b51: <witness> = impl_witness file.%J.impl_witness_table.loc17, @D.as.J.impl.6e3(%T) [symbolic]
  489. // CHECK:STDOUT: }
  490. // CHECK:STDOUT:
  491. // CHECK:STDOUT: file {
  492. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  493. // CHECK:STDOUT: .D = %D.decl
  494. // CHECK:STDOUT: .J = %J.decl
  495. // CHECK:STDOUT: }
  496. // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {}
  497. // CHECK:STDOUT: %J.decl: %J.type.2b8 = interface_decl @J [concrete = constants.%J.generic] {
  498. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  499. // CHECK:STDOUT: } {
  500. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  501. // CHECK:STDOUT: %T.loc5_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_13.1 (constants.%T)]
  502. // CHECK:STDOUT: }
  503. // CHECK:STDOUT: impl_decl @D.as.J.impl.bff [concrete] {
  504. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  505. // CHECK:STDOUT: } {
  506. // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
  507. // CHECK:STDOUT: %J.ref: %J.type.2b8 = name_ref J, file.%J.decl [concrete = constants.%J.generic]
  508. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_14.1 [symbolic = %T.loc11_14.2 (constants.%T)]
  509. // CHECK:STDOUT: %J.type.loc11_32.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc11_32.2 (constants.%J.type.8a0)]
  510. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  511. // CHECK:STDOUT: %T.loc11_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_14.2 (constants.%T)]
  512. // CHECK:STDOUT: }
  513. // CHECK:STDOUT: %J.impl_witness_table.loc11 = impl_witness_table (), @D.as.J.impl.bff [concrete]
  514. // CHECK:STDOUT: %J.impl_witness.loc11: <witness> = impl_witness %J.impl_witness_table.loc11, @D.as.J.impl.bff(constants.%T) [symbolic = @D.as.J.impl.bff.%J.impl_witness (constants.%J.impl_witness.d8b)]
  515. // CHECK:STDOUT: impl_decl @D.as.J.impl.6e3 [concrete] {
  516. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  517. // CHECK:STDOUT: } {
  518. // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
  519. // CHECK:STDOUT: %J.ref: %J.type.2b8 = name_ref J, file.%J.decl [concrete = constants.%J.generic]
  520. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc17_14.1 [symbolic = %T.loc17_14.2 (constants.%T)]
  521. // CHECK:STDOUT: %ptr.loc17_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc17_32.2 (constants.%ptr)]
  522. // CHECK:STDOUT: %J.type.loc17_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc17_33.2 (constants.%J.type.f32)]
  523. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  524. // CHECK:STDOUT: %T.loc17_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc17_14.2 (constants.%T)]
  525. // CHECK:STDOUT: }
  526. // CHECK:STDOUT: %J.impl_witness_table.loc17 = impl_witness_table (), @D.as.J.impl.6e3 [concrete]
  527. // CHECK:STDOUT: %J.impl_witness.loc17: <witness> = impl_witness %J.impl_witness_table.loc17, @D.as.J.impl.6e3(constants.%T) [symbolic = @D.as.J.impl.6e3.%J.impl_witness (constants.%J.impl_witness.b51)]
  528. // CHECK:STDOUT: }
  529. // CHECK:STDOUT:
  530. // CHECK:STDOUT: generic interface @J(%T.loc5_13.2: type) {
  531. // CHECK:STDOUT: %T.loc5_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc5_13.1 (constants.%T)]
  532. // CHECK:STDOUT:
  533. // CHECK:STDOUT: !definition:
  534. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T.loc5_13.1)> [symbolic = %J.type (constants.%J.type.8a0)]
  535. // CHECK:STDOUT: %Self.2: @J.%J.type (%J.type.8a0) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)]
  536. // CHECK:STDOUT:
  537. // CHECK:STDOUT: interface {
  538. // CHECK:STDOUT: %Self.1: @J.%J.type (%J.type.8a0) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)]
  539. // CHECK:STDOUT:
  540. // CHECK:STDOUT: !members:
  541. // CHECK:STDOUT: .Self = %Self.1
  542. // CHECK:STDOUT: witness = ()
  543. // CHECK:STDOUT: }
  544. // CHECK:STDOUT: }
  545. // CHECK:STDOUT:
  546. // CHECK:STDOUT: generic impl @D.as.J.impl.bff(%T.loc11_14.1: type) {
  547. // CHECK:STDOUT: %T.loc11_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_14.2 (constants.%T)]
  548. // 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.8a0)]
  549. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness file.%J.impl_witness_table.loc11, @D.as.J.impl.bff(%T.loc11_14.2) [symbolic = %J.impl_witness (constants.%J.impl_witness.d8b)]
  550. // CHECK:STDOUT:
  551. // CHECK:STDOUT: impl: %D.ref as %J.type.loc11_32.1;
  552. // CHECK:STDOUT: }
  553. // CHECK:STDOUT:
  554. // CHECK:STDOUT: generic impl @D.as.J.impl.6e3(%T.loc17_14.1: type) {
  555. // CHECK:STDOUT: %T.loc17_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc17_14.2 (constants.%T)]
  556. // CHECK:STDOUT: %ptr.loc17_32.2: type = ptr_type %T.loc17_14.2 [symbolic = %ptr.loc17_32.2 (constants.%ptr)]
  557. // 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.f32)]
  558. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness file.%J.impl_witness_table.loc17, @D.as.J.impl.6e3(%T.loc17_14.2) [symbolic = %J.impl_witness (constants.%J.impl_witness.b51)]
  559. // CHECK:STDOUT:
  560. // CHECK:STDOUT: impl: %D.ref as %J.type.loc17_33.1;
  561. // CHECK:STDOUT: }
  562. // CHECK:STDOUT:
  563. // CHECK:STDOUT: class @D {
  564. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  565. // CHECK:STDOUT: complete_type_witness = %complete_type
  566. // CHECK:STDOUT:
  567. // CHECK:STDOUT: !members:
  568. // CHECK:STDOUT: .Self = constants.%D
  569. // CHECK:STDOUT: }
  570. // CHECK:STDOUT:
  571. // CHECK:STDOUT: specific @J(constants.%T) {
  572. // CHECK:STDOUT: %T.loc5_13.1 => constants.%T
  573. // CHECK:STDOUT: }
  574. // CHECK:STDOUT:
  575. // CHECK:STDOUT: specific @D.as.J.impl.bff(constants.%T) {
  576. // CHECK:STDOUT: %T.loc11_14.2 => constants.%T
  577. // CHECK:STDOUT: %J.type.loc11_32.2 => constants.%J.type.8a0
  578. // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.d8b
  579. // CHECK:STDOUT: }
  580. // CHECK:STDOUT:
  581. // CHECK:STDOUT: specific @J(constants.%ptr) {
  582. // CHECK:STDOUT: %T.loc5_13.1 => constants.%ptr
  583. // CHECK:STDOUT: }
  584. // CHECK:STDOUT:
  585. // CHECK:STDOUT: specific @D.as.J.impl.6e3(constants.%T) {
  586. // CHECK:STDOUT: %T.loc17_14.2 => constants.%T
  587. // CHECK:STDOUT: %ptr.loc17_32.2 => constants.%ptr
  588. // CHECK:STDOUT: %J.type.loc17_33.2 => constants.%J.type.f32
  589. // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.b51
  590. // CHECK:STDOUT: }
  591. // CHECK:STDOUT:
  592. // CHECK:STDOUT: --- fail_import_generic_decl.impl.carbon
  593. // CHECK:STDOUT:
  594. // CHECK:STDOUT: constants {
  595. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  596. // CHECK:STDOUT: %J.type.2b8: type = generic_interface_type @J [concrete]
  597. // CHECK:STDOUT: %J.generic: %J.type.2b8 = struct_value () [concrete]
  598. // CHECK:STDOUT: %J.type.8a0: type = facet_type <@J, @J(%T)> [symbolic]
  599. // CHECK:STDOUT: %Self: %J.type.8a0 = bind_symbolic_name Self, 1 [symbolic]
  600. // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
  601. // CHECK:STDOUT: %D: type = class_type @D [concrete]
  602. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  603. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  604. // CHECK:STDOUT: %J.impl_witness.d8b: <witness> = impl_witness imports.%J.impl_witness_table.95b, @D.as.J.impl.bff622.1(%T) [symbolic]
  605. // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic]
  606. // CHECK:STDOUT: %J.type.f32: type = facet_type <@J, @J(%ptr)> [symbolic]
  607. // CHECK:STDOUT: %J.impl_witness.b51: <witness> = impl_witness imports.%J.impl_witness_table.6cc, @D.as.J.impl.6e36e2.1(%T) [symbolic]
  608. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  609. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self]
  610. // CHECK:STDOUT: }
  611. // CHECK:STDOUT:
  612. // CHECK:STDOUT: imports {
  613. // CHECK:STDOUT: %Main.D: type = import_ref Main//import_generic_decl, D, loaded [concrete = constants.%D]
  614. // CHECK:STDOUT: %Main.J: %J.type.2b8 = import_ref Main//import_generic_decl, J, loaded [concrete = constants.%J.generic]
  615. // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//import_generic_decl, loc5_13, loaded [symbolic = @J.%T (constants.%T)]
  616. // CHECK:STDOUT: %Main.import_ref.379 = import_ref Main//import_generic_decl, inst{{[0-9A-F]+}} [no loc], unloaded
  617. // CHECK:STDOUT: %Main.import_ref.8f2: <witness> = import_ref Main//import_generic_decl, loc4_10, loaded [concrete = constants.%complete_type]
  618. // CHECK:STDOUT: %Main.import_ref.cab = import_ref Main//import_generic_decl, inst{{[0-9A-F]+}} [no loc], unloaded
  619. // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//import_generic_decl, loc11_14, loaded [symbolic = @D.as.J.impl.bff622.1.%T (constants.%T)]
  620. // CHECK:STDOUT: %Main.import_ref.aa9f8a.1: type = import_ref Main//import_generic_decl, loc11_24, loaded [concrete = constants.%D]
  621. // CHECK:STDOUT: %Main.import_ref.f33: type = import_ref Main//import_generic_decl, loc11_32, loaded [symbolic = @D.as.J.impl.bff622.1.%J.type (constants.%J.type.8a0)]
  622. // CHECK:STDOUT: %J.impl_witness_table.95b = impl_witness_table (), @D.as.J.impl.bff622.1 [concrete]
  623. // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//import_generic_decl, loc17_14, loaded [symbolic = @D.as.J.impl.6e36e2.1.%T (constants.%T)]
  624. // CHECK:STDOUT: %Main.import_ref.aa9f8a.2: type = import_ref Main//import_generic_decl, loc17_24, loaded [concrete = constants.%D]
  625. // CHECK:STDOUT: %Main.import_ref.5ca: type = import_ref Main//import_generic_decl, loc17_33, loaded [symbolic = @D.as.J.impl.6e36e2.1.%J.type (constants.%J.type.f32)]
  626. // CHECK:STDOUT: %J.impl_witness_table.6cc = impl_witness_table (), @D.as.J.impl.6e36e2.1 [concrete]
  627. // CHECK:STDOUT: }
  628. // CHECK:STDOUT:
  629. // CHECK:STDOUT: file {
  630. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  631. // CHECK:STDOUT: .D = imports.%Main.D
  632. // CHECK:STDOUT: .J = imports.%Main.J
  633. // CHECK:STDOUT: }
  634. // CHECK:STDOUT: %default.import.loc2_35.1 = import <none>
  635. // CHECK:STDOUT: %default.import.loc2_35.2 = import <none>
  636. // CHECK:STDOUT: impl_decl @D.as.J.impl.bff622.2 [concrete] {
  637. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  638. // CHECK:STDOUT: } {
  639. // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D]
  640. // CHECK:STDOUT: %J.ref: %J.type.2b8 = name_ref J, imports.%Main.J [concrete = constants.%J.generic]
  641. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)]
  642. // CHECK:STDOUT: %J.type.loc8_32.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc8_32.2 (constants.%J.type.8a0)]
  643. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  644. // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
  645. // CHECK:STDOUT: }
  646. // CHECK:STDOUT: impl_decl @D.as.J.impl.bff622.3 [concrete] {
  647. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  648. // CHECK:STDOUT: } {
  649. // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D]
  650. // CHECK:STDOUT: %J.ref: %J.type.2b8 = name_ref J, imports.%Main.J [concrete = constants.%J.generic]
  651. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc14_14.1 [symbolic = %T.loc14_14.2 (constants.%T)]
  652. // CHECK:STDOUT: %J.type.loc14_32.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc14_32.2 (constants.%J.type.8a0)]
  653. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  654. // CHECK:STDOUT: %T.loc14_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_14.2 (constants.%T)]
  655. // CHECK:STDOUT: }
  656. // CHECK:STDOUT: impl_decl @D.as.J.impl.6e36e2.2 [concrete] {
  657. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  658. // CHECK:STDOUT: } {
  659. // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D]
  660. // CHECK:STDOUT: %J.ref: %J.type.2b8 = name_ref J, imports.%Main.J [concrete = constants.%J.generic]
  661. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc20_14.1 [symbolic = %T.loc20_14.2 (constants.%T)]
  662. // CHECK:STDOUT: %ptr.loc20_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc20_32.2 (constants.%ptr)]
  663. // CHECK:STDOUT: %J.type.loc20_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc20_33.2 (constants.%J.type.f32)]
  664. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  665. // CHECK:STDOUT: %T.loc20_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc20_14.2 (constants.%T)]
  666. // CHECK:STDOUT: }
  667. // CHECK:STDOUT: impl_decl @D.as.J.impl.6e36e2.3 [concrete] {
  668. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  669. // CHECK:STDOUT: } {
  670. // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%Main.D [concrete = constants.%D]
  671. // CHECK:STDOUT: %J.ref: %J.type.2b8 = name_ref J, imports.%Main.J [concrete = constants.%J.generic]
  672. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc26_14.1 [symbolic = %T.loc26_14.2 (constants.%T)]
  673. // CHECK:STDOUT: %ptr.loc26_32.1: type = ptr_type %T.ref [symbolic = %ptr.loc26_32.2 (constants.%ptr)]
  674. // CHECK:STDOUT: %J.type.loc26_33.1: type = facet_type <@J, @J(constants.%ptr)> [symbolic = %J.type.loc26_33.2 (constants.%J.type.f32)]
  675. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  676. // CHECK:STDOUT: %T.loc26_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc26_14.2 (constants.%T)]
  677. // CHECK:STDOUT: }
  678. // CHECK:STDOUT: }
  679. // CHECK:STDOUT:
  680. // CHECK:STDOUT: generic interface @J(imports.%Main.import_ref.5ab3ec.1: type) [from "fail_import_generic_decl.carbon"] {
  681. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  682. // CHECK:STDOUT:
  683. // CHECK:STDOUT: !definition:
  684. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.8a0)]
  685. // CHECK:STDOUT: %Self: @J.%J.type (%J.type.8a0) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)]
  686. // CHECK:STDOUT:
  687. // CHECK:STDOUT: interface {
  688. // CHECK:STDOUT: !members:
  689. // CHECK:STDOUT: .Self = imports.%Main.import_ref.379
  690. // CHECK:STDOUT: witness = ()
  691. // CHECK:STDOUT: }
  692. // CHECK:STDOUT: }
  693. // CHECK:STDOUT:
  694. // CHECK:STDOUT: generic impl @D.as.J.impl.bff622.1(imports.%Main.import_ref.5ab3ec.2: type) [from "fail_import_generic_decl.carbon"] {
  695. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  696. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.8a0)]
  697. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness imports.%J.impl_witness_table.95b, @D.as.J.impl.bff622.1(%T) [symbolic = %J.impl_witness (constants.%J.impl_witness.d8b)]
  698. // CHECK:STDOUT:
  699. // CHECK:STDOUT: impl: imports.%Main.import_ref.aa9f8a.1 as imports.%Main.import_ref.f33;
  700. // CHECK:STDOUT: }
  701. // CHECK:STDOUT:
  702. // CHECK:STDOUT: generic impl @D.as.J.impl.6e36e2.1(imports.%Main.import_ref.5ab3ec.3: type) [from "fail_import_generic_decl.carbon"] {
  703. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  704. // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic = %ptr (constants.%ptr)]
  705. // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%ptr)> [symbolic = %J.type (constants.%J.type.f32)]
  706. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness imports.%J.impl_witness_table.6cc, @D.as.J.impl.6e36e2.1(%T) [symbolic = %J.impl_witness (constants.%J.impl_witness.b51)]
  707. // CHECK:STDOUT:
  708. // CHECK:STDOUT: impl: imports.%Main.import_ref.aa9f8a.2 as imports.%Main.import_ref.5ca;
  709. // CHECK:STDOUT: }
  710. // CHECK:STDOUT:
  711. // CHECK:STDOUT: generic impl @D.as.J.impl.bff622.2(%T.loc8_14.1: type) {
  712. // CHECK:STDOUT: %T.loc8_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)]
  713. // 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.8a0)]
  714. // CHECK:STDOUT:
  715. // CHECK:STDOUT: impl: %D.ref as %J.type.loc8_32.1;
  716. // CHECK:STDOUT: }
  717. // CHECK:STDOUT:
  718. // CHECK:STDOUT: generic impl @D.as.J.impl.bff622.3(%T.loc14_14.1: type) {
  719. // CHECK:STDOUT: %T.loc14_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc14_14.2 (constants.%T)]
  720. // 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.8a0)]
  721. // CHECK:STDOUT:
  722. // CHECK:STDOUT: !definition:
  723. // CHECK:STDOUT:
  724. // CHECK:STDOUT: impl: %D.ref as %J.type.loc14_32.1 {
  725. // CHECK:STDOUT: !members:
  726. // CHECK:STDOUT: witness = <error>
  727. // CHECK:STDOUT: }
  728. // CHECK:STDOUT: }
  729. // CHECK:STDOUT:
  730. // CHECK:STDOUT: generic impl @D.as.J.impl.6e36e2.2(%T.loc20_14.1: type) {
  731. // CHECK:STDOUT: %T.loc20_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc20_14.2 (constants.%T)]
  732. // CHECK:STDOUT: %ptr.loc20_32.2: type = ptr_type %T.loc20_14.2 [symbolic = %ptr.loc20_32.2 (constants.%ptr)]
  733. // 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.f32)]
  734. // CHECK:STDOUT:
  735. // CHECK:STDOUT: impl: %D.ref as %J.type.loc20_33.1;
  736. // CHECK:STDOUT: }
  737. // CHECK:STDOUT:
  738. // CHECK:STDOUT: generic impl @D.as.J.impl.6e36e2.3(%T.loc26_14.1: type) {
  739. // CHECK:STDOUT: %T.loc26_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc26_14.2 (constants.%T)]
  740. // CHECK:STDOUT: %ptr.loc26_32.2: type = ptr_type %T.loc26_14.2 [symbolic = %ptr.loc26_32.2 (constants.%ptr)]
  741. // 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.f32)]
  742. // CHECK:STDOUT:
  743. // CHECK:STDOUT: !definition:
  744. // CHECK:STDOUT:
  745. // CHECK:STDOUT: impl: %D.ref as %J.type.loc26_33.1 {
  746. // CHECK:STDOUT: !members:
  747. // CHECK:STDOUT: witness = <error>
  748. // CHECK:STDOUT: }
  749. // CHECK:STDOUT: }
  750. // CHECK:STDOUT:
  751. // CHECK:STDOUT: class @D [from "fail_import_generic_decl.carbon"] {
  752. // CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f2
  753. // CHECK:STDOUT:
  754. // CHECK:STDOUT: !members:
  755. // CHECK:STDOUT: .Self = imports.%Main.import_ref.cab
  756. // CHECK:STDOUT: }
  757. // CHECK:STDOUT:
  758. // CHECK:STDOUT: specific @J(constants.%T) {
  759. // CHECK:STDOUT: %T => constants.%T
  760. // CHECK:STDOUT: }
  761. // CHECK:STDOUT:
  762. // CHECK:STDOUT: specific @D.as.J.impl.bff622.1(constants.%T) {
  763. // CHECK:STDOUT: %T => constants.%T
  764. // CHECK:STDOUT: %J.type => constants.%J.type.8a0
  765. // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.d8b
  766. // CHECK:STDOUT: }
  767. // CHECK:STDOUT:
  768. // CHECK:STDOUT: specific @J(constants.%ptr) {
  769. // CHECK:STDOUT: %T => constants.%ptr
  770. // CHECK:STDOUT: }
  771. // CHECK:STDOUT:
  772. // CHECK:STDOUT: specific @D.as.J.impl.6e36e2.1(constants.%T) {
  773. // CHECK:STDOUT: %T => constants.%T
  774. // CHECK:STDOUT: %ptr => constants.%ptr
  775. // CHECK:STDOUT: %J.type => constants.%J.type.f32
  776. // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness.b51
  777. // CHECK:STDOUT: }
  778. // CHECK:STDOUT:
  779. // CHECK:STDOUT: specific @D.as.J.impl.bff622.2(constants.%T) {
  780. // CHECK:STDOUT: %T.loc8_14.2 => constants.%T
  781. // CHECK:STDOUT: %J.type.loc8_32.2 => constants.%J.type.8a0
  782. // CHECK:STDOUT: }
  783. // CHECK:STDOUT:
  784. // CHECK:STDOUT: specific @D.as.J.impl.bff622.3(constants.%T) {
  785. // CHECK:STDOUT: %T.loc14_14.2 => constants.%T
  786. // CHECK:STDOUT: %J.type.loc14_32.2 => constants.%J.type.8a0
  787. // CHECK:STDOUT: }
  788. // CHECK:STDOUT:
  789. // CHECK:STDOUT: specific @D.as.J.impl.6e36e2.2(constants.%T) {
  790. // CHECK:STDOUT: %T.loc20_14.2 => constants.%T
  791. // CHECK:STDOUT: %ptr.loc20_32.2 => constants.%ptr
  792. // CHECK:STDOUT: %J.type.loc20_33.2 => constants.%J.type.f32
  793. // CHECK:STDOUT: }
  794. // CHECK:STDOUT:
  795. // CHECK:STDOUT: specific @D.as.J.impl.6e36e2.3(constants.%T) {
  796. // CHECK:STDOUT: %T.loc26_14.2 => constants.%T
  797. // CHECK:STDOUT: %ptr.loc26_32.2 => constants.%ptr
  798. // CHECK:STDOUT: %J.type.loc26_33.2 => constants.%J.type.f32
  799. // CHECK:STDOUT: }
  800. // CHECK:STDOUT: