generic_redeclaration.carbon 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806
  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/destroy.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/generic_redeclaration.carbon
  12. // TIP: To dump output, run:
  13. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/generic_redeclaration.carbon
  14. // --- fail_todo_same_self_and_interface.carbon
  15. library "[[@TEST_NAME]]";
  16. interface Interface {}
  17. interface I {}
  18. interface J {}
  19. interface K {}
  20. interface L {}
  21. // TODO: Put these in a match_first so the test will pass again.
  22. impl forall [T:! I] T as Interface;
  23. impl forall [T:! J] T as Interface;
  24. impl forall [T:! K] T as Interface;
  25. impl forall [T:! L] T as Interface;
  26. // These are different impls, so they are not redefinitions, even though the
  27. // self type and constraint type are the same.
  28. impl forall [T:! I] T as Interface {}
  29. // CHECK:STDERR: fail_todo_same_self_and_interface.carbon:[[@LINE+7]]:1: error: found non-final `impl` with the same type structure as another non-final `impl` [ImplNonFinalSameTypeStructure]
  30. // CHECK:STDERR: impl forall [T:! J] T as Interface {}
  31. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  32. // CHECK:STDERR: fail_todo_same_self_and_interface.carbon:[[@LINE-4]]:1: note: other `impl` here [ImplNonFinalSameTypeStructureNote]
  33. // CHECK:STDERR: impl forall [T:! I] T as Interface {}
  34. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  35. // CHECK:STDERR:
  36. impl forall [T:! J] T as Interface {}
  37. // CHECK:STDERR: fail_todo_same_self_and_interface.carbon:[[@LINE+7]]:1: error: found non-final `impl` with the same type structure as another non-final `impl` [ImplNonFinalSameTypeStructure]
  38. // CHECK:STDERR: impl forall [T:! K] T as Interface {}
  39. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  40. // CHECK:STDERR: fail_todo_same_self_and_interface.carbon:[[@LINE-12]]:1: note: other `impl` here [ImplNonFinalSameTypeStructureNote]
  41. // CHECK:STDERR: impl forall [T:! I] T as Interface {}
  42. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  43. // CHECK:STDERR:
  44. impl forall [T:! K] T as Interface {}
  45. // CHECK:STDERR: fail_todo_same_self_and_interface.carbon:[[@LINE+7]]:1: error: found non-final `impl` with the same type structure as another non-final `impl` [ImplNonFinalSameTypeStructure]
  46. // CHECK:STDERR: impl forall [T:! L] T as Interface {}
  47. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  48. // CHECK:STDERR: fail_todo_same_self_and_interface.carbon:[[@LINE-20]]:1: note: other `impl` here [ImplNonFinalSameTypeStructureNote]
  49. // CHECK:STDERR: impl forall [T:! I] T as Interface {}
  50. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  51. // CHECK:STDERR:
  52. impl forall [T:! L] T as Interface {}
  53. // --- fail_same_self_and_interface_redefined.carbon
  54. library "[[@TEST_NAME]]";
  55. interface I {}
  56. interface J {}
  57. impl forall [T:! I] T as J {}
  58. // CHECK:STDERR: fail_same_self_and_interface_redefined.carbon:[[@LINE+7]]:1: error: redefinition of `impl T as J` [ImplRedefinition]
  59. // CHECK:STDERR: impl forall [T:! I] T as J {}
  60. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  61. // CHECK:STDERR: fail_same_self_and_interface_redefined.carbon:[[@LINE-4]]:1: note: previous definition was here [ImplPreviousDefinition]
  62. // CHECK:STDERR: impl forall [T:! I] T as J {}
  63. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  64. // CHECK:STDERR:
  65. impl forall [T:! I] T as J {}
  66. // --- fail_same_type_different_spelling.carbon
  67. library "[[@TEST_NAME]]";
  68. class C;
  69. interface I {}
  70. // Since the spelling is different, it's not caught as a redefinition, but it
  71. // is diagnosed as an overlapping impl without using a `match_first` block.
  72. impl C as I {}
  73. // CHECK:STDERR: fail_same_type_different_spelling.carbon:[[@LINE+7]]:1: error: found non-final `impl` with the same type structure as another non-final `impl` [ImplNonFinalSameTypeStructure]
  74. // CHECK:STDERR: impl (C, C).0 as I {}
  75. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
  76. // CHECK:STDERR: fail_same_type_different_spelling.carbon:[[@LINE-4]]:1: note: other `impl` here [ImplNonFinalSameTypeStructureNote]
  77. // CHECK:STDERR: impl C as I {}
  78. // CHECK:STDERR: ^~~~~~~~~~~~~
  79. // CHECK:STDERR:
  80. impl (C, C).0 as I {}
  81. // --- fail_redefinition_generic_regions.carbon
  82. interface I {}
  83. impl forall [T:! type] T as I {
  84. fn A() {}
  85. }
  86. // CHECK:STDERR: fail_redefinition_generic_regions.carbon:[[@LINE+7]]:1: error: redefinition of `impl T as I` [ImplRedefinition]
  87. // CHECK:STDERR: impl forall [T:! type] T as I {
  88. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  89. // CHECK:STDERR: fail_redefinition_generic_regions.carbon:[[@LINE-7]]:1: note: previous definition was here [ImplPreviousDefinition]
  90. // CHECK:STDERR: impl forall [T:! type] T as I {
  91. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  92. // CHECK:STDERR:
  93. impl forall [T:! type] T as I {
  94. // Although not referenced, B has the same generic region index of A, and
  95. // makes C a different index. We used to merge, and this was a crash.
  96. fn B() {}
  97. fn C() -> () { return (); }
  98. fn D() -> () {
  99. return C();
  100. }
  101. }
  102. // CHECK:STDOUT: --- fail_todo_same_self_and_interface.carbon
  103. // CHECK:STDOUT:
  104. // CHECK:STDOUT: constants {
  105. // CHECK:STDOUT: %Interface.type: type = facet_type <@Interface> [concrete]
  106. // CHECK:STDOUT: %Self.7fe: %Interface.type = symbolic_binding Self, 0 [symbolic]
  107. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  108. // CHECK:STDOUT: %Self.9f2: %I.type = symbolic_binding Self, 0 [symbolic]
  109. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  110. // CHECK:STDOUT: %Self.dc6: %J.type = symbolic_binding Self, 0 [symbolic]
  111. // CHECK:STDOUT: %K.type: type = facet_type <@K> [concrete]
  112. // CHECK:STDOUT: %Self.999: %K.type = symbolic_binding Self, 0 [symbolic]
  113. // CHECK:STDOUT: %L.type: type = facet_type <@L> [concrete]
  114. // CHECK:STDOUT: %Self.b43: %L.type = symbolic_binding Self, 0 [symbolic]
  115. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  116. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  117. // CHECK:STDOUT: %T.9f2: %I.type = symbolic_binding T, 0 [symbolic]
  118. // CHECK:STDOUT: %pattern_type.09a: type = pattern_type %I.type [concrete]
  119. // CHECK:STDOUT: %T.binding.as_type.bcb: type = symbolic_binding_type T, 0, %T.9f2 [symbolic]
  120. // CHECK:STDOUT: %Interface.impl_witness.71f: <witness> = impl_witness file.%Interface.impl_witness_table.loc12, @T.binding.as_type.as.Interface.impl.de7(%T.9f2) [symbolic]
  121. // CHECK:STDOUT: %T.dc6: %J.type = symbolic_binding T, 0 [symbolic]
  122. // CHECK:STDOUT: %pattern_type.84b: type = pattern_type %J.type [concrete]
  123. // CHECK:STDOUT: %T.binding.as_type.1fa: type = symbolic_binding_type T, 0, %T.dc6 [symbolic]
  124. // CHECK:STDOUT: %Interface.impl_witness.fb4: <witness> = impl_witness file.%Interface.impl_witness_table.loc13, @T.binding.as_type.as.Interface.impl.af4(%T.dc6) [symbolic]
  125. // CHECK:STDOUT: %T.999: %K.type = symbolic_binding T, 0 [symbolic]
  126. // CHECK:STDOUT: %pattern_type.0fc: type = pattern_type %K.type [concrete]
  127. // CHECK:STDOUT: %T.binding.as_type.1c0: type = symbolic_binding_type T, 0, %T.999 [symbolic]
  128. // CHECK:STDOUT: %Interface.impl_witness.1fb: <witness> = impl_witness file.%Interface.impl_witness_table.loc14, @T.binding.as_type.as.Interface.impl.f9f(%T.999) [symbolic]
  129. // CHECK:STDOUT: %T.b43: %L.type = symbolic_binding T, 0 [symbolic]
  130. // CHECK:STDOUT: %pattern_type.ebc: type = pattern_type %L.type [concrete]
  131. // CHECK:STDOUT: %T.binding.as_type.66e: type = symbolic_binding_type T, 0, %T.b43 [symbolic]
  132. // CHECK:STDOUT: %Interface.impl_witness.b8c: <witness> = impl_witness file.%Interface.impl_witness_table.loc15, @T.binding.as_type.as.Interface.impl.f56(%T.b43) [symbolic]
  133. // CHECK:STDOUT: }
  134. // CHECK:STDOUT:
  135. // CHECK:STDOUT: imports {
  136. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  137. // CHECK:STDOUT: import Core//prelude
  138. // CHECK:STDOUT: import Core//prelude/...
  139. // CHECK:STDOUT: }
  140. // CHECK:STDOUT: }
  141. // CHECK:STDOUT:
  142. // CHECK:STDOUT: file {
  143. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  144. // CHECK:STDOUT: .Core = imports.%Core
  145. // CHECK:STDOUT: .Interface = %Interface.decl
  146. // CHECK:STDOUT: .I = %I.decl
  147. // CHECK:STDOUT: .J = %J.decl
  148. // CHECK:STDOUT: .K = %K.decl
  149. // CHECK:STDOUT: .L = %L.decl
  150. // CHECK:STDOUT: }
  151. // CHECK:STDOUT: %Core.import = import Core
  152. // CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [concrete = constants.%Interface.type] {} {}
  153. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  154. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  155. // CHECK:STDOUT: %K.decl: type = interface_decl @K [concrete = constants.%K.type] {} {}
  156. // CHECK:STDOUT: %L.decl: type = interface_decl @L [concrete = constants.%L.type] {} {}
  157. // CHECK:STDOUT: impl_decl @T.binding.as_type.as.Interface.impl.de7 [concrete] {
  158. // CHECK:STDOUT: %T.patt: %pattern_type.09a = symbolic_binding_pattern T, 0 [concrete]
  159. // CHECK:STDOUT: } {
  160. // CHECK:STDOUT: %T.ref.loc12: %I.type = name_ref T, %T.loc12_14.1 [symbolic = %T.loc12_14.2 (constants.%T.9f2)]
  161. // CHECK:STDOUT: %T.as_type.loc12: type = facet_access_type %T.ref.loc12 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.bcb)]
  162. // CHECK:STDOUT: %.loc12_21: type = converted %T.ref.loc12, %T.as_type.loc12 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.bcb)]
  163. // CHECK:STDOUT: %Interface.ref.loc12: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type]
  164. // CHECK:STDOUT: %.loc12_18: type = splice_block %I.ref.loc12 [concrete = constants.%I.type] {
  165. // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  166. // CHECK:STDOUT: %I.ref.loc12: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  167. // CHECK:STDOUT: }
  168. // CHECK:STDOUT: %T.loc12_14.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc12_14.2 (constants.%T.9f2)]
  169. // CHECK:STDOUT: }
  170. // CHECK:STDOUT: %Interface.impl_witness_table.loc12 = impl_witness_table (), @T.binding.as_type.as.Interface.impl.de7 [concrete]
  171. // CHECK:STDOUT: %Interface.impl_witness.loc12: <witness> = impl_witness %Interface.impl_witness_table.loc12, @T.binding.as_type.as.Interface.impl.de7(constants.%T.9f2) [symbolic = @T.binding.as_type.as.Interface.impl.de7.%Interface.impl_witness (constants.%Interface.impl_witness.71f)]
  172. // CHECK:STDOUT: impl_decl @T.binding.as_type.as.Interface.impl.af4 [concrete] {
  173. // CHECK:STDOUT: %T.patt: %pattern_type.84b = symbolic_binding_pattern T, 0 [concrete]
  174. // CHECK:STDOUT: } {
  175. // CHECK:STDOUT: %T.ref.loc13: %J.type = name_ref T, %T.loc13_14.1 [symbolic = %T.loc13_14.2 (constants.%T.dc6)]
  176. // CHECK:STDOUT: %T.as_type.loc13: type = facet_access_type %T.ref.loc13 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.1fa)]
  177. // CHECK:STDOUT: %.loc13_21: type = converted %T.ref.loc13, %T.as_type.loc13 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.1fa)]
  178. // CHECK:STDOUT: %Interface.ref.loc13: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type]
  179. // CHECK:STDOUT: %.loc13_18: type = splice_block %J.ref.loc13 [concrete = constants.%J.type] {
  180. // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  181. // CHECK:STDOUT: %J.ref.loc13: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  182. // CHECK:STDOUT: }
  183. // CHECK:STDOUT: %T.loc13_14.1: %J.type = symbolic_binding T, 0 [symbolic = %T.loc13_14.2 (constants.%T.dc6)]
  184. // CHECK:STDOUT: }
  185. // CHECK:STDOUT: %Interface.impl_witness_table.loc13 = impl_witness_table (), @T.binding.as_type.as.Interface.impl.af4 [concrete]
  186. // CHECK:STDOUT: %Interface.impl_witness.loc13: <witness> = impl_witness %Interface.impl_witness_table.loc13, @T.binding.as_type.as.Interface.impl.af4(constants.%T.dc6) [symbolic = @T.binding.as_type.as.Interface.impl.af4.%Interface.impl_witness (constants.%Interface.impl_witness.fb4)]
  187. // CHECK:STDOUT: impl_decl @T.binding.as_type.as.Interface.impl.f9f [concrete] {
  188. // CHECK:STDOUT: %T.patt: %pattern_type.0fc = symbolic_binding_pattern T, 0 [concrete]
  189. // CHECK:STDOUT: } {
  190. // CHECK:STDOUT: %T.ref.loc14: %K.type = name_ref T, %T.loc14_14.1 [symbolic = %T.loc14_14.2 (constants.%T.999)]
  191. // CHECK:STDOUT: %T.as_type.loc14: type = facet_access_type %T.ref.loc14 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.1c0)]
  192. // CHECK:STDOUT: %.loc14_21: type = converted %T.ref.loc14, %T.as_type.loc14 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.1c0)]
  193. // CHECK:STDOUT: %Interface.ref.loc14: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type]
  194. // CHECK:STDOUT: %.loc14_18: type = splice_block %K.ref.loc14 [concrete = constants.%K.type] {
  195. // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  196. // CHECK:STDOUT: %K.ref.loc14: type = name_ref K, file.%K.decl [concrete = constants.%K.type]
  197. // CHECK:STDOUT: }
  198. // CHECK:STDOUT: %T.loc14_14.1: %K.type = symbolic_binding T, 0 [symbolic = %T.loc14_14.2 (constants.%T.999)]
  199. // CHECK:STDOUT: }
  200. // CHECK:STDOUT: %Interface.impl_witness_table.loc14 = impl_witness_table (), @T.binding.as_type.as.Interface.impl.f9f [concrete]
  201. // CHECK:STDOUT: %Interface.impl_witness.loc14: <witness> = impl_witness %Interface.impl_witness_table.loc14, @T.binding.as_type.as.Interface.impl.f9f(constants.%T.999) [symbolic = @T.binding.as_type.as.Interface.impl.f9f.%Interface.impl_witness (constants.%Interface.impl_witness.1fb)]
  202. // CHECK:STDOUT: impl_decl @T.binding.as_type.as.Interface.impl.f56 [concrete] {
  203. // CHECK:STDOUT: %T.patt: %pattern_type.ebc = symbolic_binding_pattern T, 0 [concrete]
  204. // CHECK:STDOUT: } {
  205. // CHECK:STDOUT: %T.ref.loc15: %L.type = name_ref T, %T.loc15_14.1 [symbolic = %T.loc15_14.2 (constants.%T.b43)]
  206. // CHECK:STDOUT: %T.as_type.loc15: type = facet_access_type %T.ref.loc15 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.66e)]
  207. // CHECK:STDOUT: %.loc15_21: type = converted %T.ref.loc15, %T.as_type.loc15 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.66e)]
  208. // CHECK:STDOUT: %Interface.ref.loc15: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type]
  209. // CHECK:STDOUT: %.loc15_18: type = splice_block %L.ref.loc15 [concrete = constants.%L.type] {
  210. // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  211. // CHECK:STDOUT: %L.ref.loc15: type = name_ref L, file.%L.decl [concrete = constants.%L.type]
  212. // CHECK:STDOUT: }
  213. // CHECK:STDOUT: %T.loc15_14.1: %L.type = symbolic_binding T, 0 [symbolic = %T.loc15_14.2 (constants.%T.b43)]
  214. // CHECK:STDOUT: }
  215. // CHECK:STDOUT: %Interface.impl_witness_table.loc15 = impl_witness_table (), @T.binding.as_type.as.Interface.impl.f56 [concrete]
  216. // CHECK:STDOUT: %Interface.impl_witness.loc15: <witness> = impl_witness %Interface.impl_witness_table.loc15, @T.binding.as_type.as.Interface.impl.f56(constants.%T.b43) [symbolic = @T.binding.as_type.as.Interface.impl.f56.%Interface.impl_witness (constants.%Interface.impl_witness.b8c)]
  217. // CHECK:STDOUT: impl_decl @T.binding.as_type.as.Interface.impl.de7 [concrete] {
  218. // CHECK:STDOUT: %T.patt: %pattern_type.09a = symbolic_binding_pattern T, 0 [concrete]
  219. // CHECK:STDOUT: } {
  220. // CHECK:STDOUT: %T.ref.loc19: %I.type = name_ref T, %T.loc19 [symbolic = %T.loc12_14.2 (constants.%T.9f2)]
  221. // CHECK:STDOUT: %T.as_type.loc19: type = facet_access_type %T.ref.loc19 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.bcb)]
  222. // CHECK:STDOUT: %.loc19_21: type = converted %T.ref.loc19, %T.as_type.loc19 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.bcb)]
  223. // CHECK:STDOUT: %Interface.ref.loc19: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type]
  224. // CHECK:STDOUT: %.loc19_18: type = splice_block %I.ref.loc19 [concrete = constants.%I.type] {
  225. // CHECK:STDOUT: %.Self.1: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  226. // CHECK:STDOUT: %I.ref.loc19: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  227. // CHECK:STDOUT: }
  228. // CHECK:STDOUT: %T.loc19: %I.type = symbolic_binding T, 0 [symbolic = %T.loc12_14.2 (constants.%T.9f2)]
  229. // CHECK:STDOUT: }
  230. // CHECK:STDOUT: impl_decl @T.binding.as_type.as.Interface.impl.af4 [concrete] {
  231. // CHECK:STDOUT: %T.patt: %pattern_type.84b = symbolic_binding_pattern T, 0 [concrete]
  232. // CHECK:STDOUT: } {
  233. // CHECK:STDOUT: %T.ref.loc27: %J.type = name_ref T, %T.loc27 [symbolic = %T.loc13_14.2 (constants.%T.dc6)]
  234. // CHECK:STDOUT: %T.as_type.loc27: type = facet_access_type %T.ref.loc27 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.1fa)]
  235. // CHECK:STDOUT: %.loc27_21: type = converted %T.ref.loc27, %T.as_type.loc27 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.1fa)]
  236. // CHECK:STDOUT: %Interface.ref.loc27: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type]
  237. // CHECK:STDOUT: %.loc27_18: type = splice_block %J.ref.loc27 [concrete = constants.%J.type] {
  238. // CHECK:STDOUT: %.Self.1: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  239. // CHECK:STDOUT: %J.ref.loc27: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  240. // CHECK:STDOUT: }
  241. // CHECK:STDOUT: %T.loc27: %J.type = symbolic_binding T, 0 [symbolic = %T.loc13_14.2 (constants.%T.dc6)]
  242. // CHECK:STDOUT: }
  243. // CHECK:STDOUT: impl_decl @T.binding.as_type.as.Interface.impl.f9f [concrete] {
  244. // CHECK:STDOUT: %T.patt: %pattern_type.0fc = symbolic_binding_pattern T, 0 [concrete]
  245. // CHECK:STDOUT: } {
  246. // CHECK:STDOUT: %T.ref.loc35: %K.type = name_ref T, %T.loc35 [symbolic = %T.loc14_14.2 (constants.%T.999)]
  247. // CHECK:STDOUT: %T.as_type.loc35: type = facet_access_type %T.ref.loc35 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.1c0)]
  248. // CHECK:STDOUT: %.loc35_21: type = converted %T.ref.loc35, %T.as_type.loc35 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.1c0)]
  249. // CHECK:STDOUT: %Interface.ref.loc35: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type]
  250. // CHECK:STDOUT: %.loc35_18: type = splice_block %K.ref.loc35 [concrete = constants.%K.type] {
  251. // CHECK:STDOUT: %.Self.1: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  252. // CHECK:STDOUT: %K.ref.loc35: type = name_ref K, file.%K.decl [concrete = constants.%K.type]
  253. // CHECK:STDOUT: }
  254. // CHECK:STDOUT: %T.loc35: %K.type = symbolic_binding T, 0 [symbolic = %T.loc14_14.2 (constants.%T.999)]
  255. // CHECK:STDOUT: }
  256. // CHECK:STDOUT: impl_decl @T.binding.as_type.as.Interface.impl.f56 [concrete] {
  257. // CHECK:STDOUT: %T.patt: %pattern_type.ebc = symbolic_binding_pattern T, 0 [concrete]
  258. // CHECK:STDOUT: } {
  259. // CHECK:STDOUT: %T.ref.loc43: %L.type = name_ref T, %T.loc43 [symbolic = %T.loc15_14.2 (constants.%T.b43)]
  260. // CHECK:STDOUT: %T.as_type.loc43: type = facet_access_type %T.ref.loc43 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.66e)]
  261. // CHECK:STDOUT: %.loc43_21: type = converted %T.ref.loc43, %T.as_type.loc43 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.66e)]
  262. // CHECK:STDOUT: %Interface.ref.loc43: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type]
  263. // CHECK:STDOUT: %.loc43_18: type = splice_block %L.ref.loc43 [concrete = constants.%L.type] {
  264. // CHECK:STDOUT: %.Self.1: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  265. // CHECK:STDOUT: %L.ref.loc43: type = name_ref L, file.%L.decl [concrete = constants.%L.type]
  266. // CHECK:STDOUT: }
  267. // CHECK:STDOUT: %T.loc43: %L.type = symbolic_binding T, 0 [symbolic = %T.loc15_14.2 (constants.%T.b43)]
  268. // CHECK:STDOUT: }
  269. // CHECK:STDOUT: }
  270. // CHECK:STDOUT:
  271. // CHECK:STDOUT: interface @Interface {
  272. // CHECK:STDOUT: %Self: %Interface.type = symbolic_binding Self, 0 [symbolic = constants.%Self.7fe]
  273. // CHECK:STDOUT:
  274. // CHECK:STDOUT: !members:
  275. // CHECK:STDOUT: .Self = %Self
  276. // CHECK:STDOUT: witness = ()
  277. // CHECK:STDOUT:
  278. // CHECK:STDOUT: !requires:
  279. // CHECK:STDOUT: }
  280. // CHECK:STDOUT:
  281. // CHECK:STDOUT: interface @I {
  282. // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.9f2]
  283. // CHECK:STDOUT:
  284. // CHECK:STDOUT: !members:
  285. // CHECK:STDOUT: .Self = %Self
  286. // CHECK:STDOUT: witness = ()
  287. // CHECK:STDOUT:
  288. // CHECK:STDOUT: !requires:
  289. // CHECK:STDOUT: }
  290. // CHECK:STDOUT:
  291. // CHECK:STDOUT: interface @J {
  292. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.dc6]
  293. // CHECK:STDOUT:
  294. // CHECK:STDOUT: !members:
  295. // CHECK:STDOUT: .Self = %Self
  296. // CHECK:STDOUT: witness = ()
  297. // CHECK:STDOUT:
  298. // CHECK:STDOUT: !requires:
  299. // CHECK:STDOUT: }
  300. // CHECK:STDOUT:
  301. // CHECK:STDOUT: interface @K {
  302. // CHECK:STDOUT: %Self: %K.type = symbolic_binding Self, 0 [symbolic = constants.%Self.999]
  303. // CHECK:STDOUT:
  304. // CHECK:STDOUT: !members:
  305. // CHECK:STDOUT: .Self = %Self
  306. // CHECK:STDOUT: witness = ()
  307. // CHECK:STDOUT:
  308. // CHECK:STDOUT: !requires:
  309. // CHECK:STDOUT: }
  310. // CHECK:STDOUT:
  311. // CHECK:STDOUT: interface @L {
  312. // CHECK:STDOUT: %Self: %L.type = symbolic_binding Self, 0 [symbolic = constants.%Self.b43]
  313. // CHECK:STDOUT:
  314. // CHECK:STDOUT: !members:
  315. // CHECK:STDOUT: .Self = %Self
  316. // CHECK:STDOUT: witness = ()
  317. // CHECK:STDOUT:
  318. // CHECK:STDOUT: !requires:
  319. // CHECK:STDOUT: }
  320. // CHECK:STDOUT:
  321. // CHECK:STDOUT: generic impl @T.binding.as_type.as.Interface.impl.de7(%T.loc12_14.1: %I.type) {
  322. // CHECK:STDOUT: %T.loc12_14.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc12_14.2 (constants.%T.9f2)]
  323. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc12_14.2 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.bcb)]
  324. // CHECK:STDOUT: %Interface.impl_witness: <witness> = impl_witness file.%Interface.impl_witness_table.loc12, @T.binding.as_type.as.Interface.impl.de7(%T.loc12_14.2) [symbolic = %Interface.impl_witness (constants.%Interface.impl_witness.71f)]
  325. // CHECK:STDOUT:
  326. // CHECK:STDOUT: !definition:
  327. // CHECK:STDOUT:
  328. // CHECK:STDOUT: impl: %.loc12_21 as %Interface.ref.loc12 {
  329. // CHECK:STDOUT: !members:
  330. // CHECK:STDOUT: witness = file.%Interface.impl_witness.loc12
  331. // CHECK:STDOUT: }
  332. // CHECK:STDOUT: }
  333. // CHECK:STDOUT:
  334. // CHECK:STDOUT: generic impl @T.binding.as_type.as.Interface.impl.af4(%T.loc13_14.1: %J.type) {
  335. // CHECK:STDOUT: %T.loc13_14.2: %J.type = symbolic_binding T, 0 [symbolic = %T.loc13_14.2 (constants.%T.dc6)]
  336. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc13_14.2 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.1fa)]
  337. // CHECK:STDOUT: %Interface.impl_witness: <witness> = impl_witness file.%Interface.impl_witness_table.loc13, @T.binding.as_type.as.Interface.impl.af4(%T.loc13_14.2) [symbolic = %Interface.impl_witness (constants.%Interface.impl_witness.fb4)]
  338. // CHECK:STDOUT:
  339. // CHECK:STDOUT: !definition:
  340. // CHECK:STDOUT:
  341. // CHECK:STDOUT: impl: %.loc13_21 as %Interface.ref.loc13 {
  342. // CHECK:STDOUT: !members:
  343. // CHECK:STDOUT: witness = file.%Interface.impl_witness.loc13
  344. // CHECK:STDOUT: }
  345. // CHECK:STDOUT: }
  346. // CHECK:STDOUT:
  347. // CHECK:STDOUT: generic impl @T.binding.as_type.as.Interface.impl.f9f(%T.loc14_14.1: %K.type) {
  348. // CHECK:STDOUT: %T.loc14_14.2: %K.type = symbolic_binding T, 0 [symbolic = %T.loc14_14.2 (constants.%T.999)]
  349. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc14_14.2 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.1c0)]
  350. // CHECK:STDOUT: %Interface.impl_witness: <witness> = impl_witness file.%Interface.impl_witness_table.loc14, @T.binding.as_type.as.Interface.impl.f9f(%T.loc14_14.2) [symbolic = %Interface.impl_witness (constants.%Interface.impl_witness.1fb)]
  351. // CHECK:STDOUT:
  352. // CHECK:STDOUT: !definition:
  353. // CHECK:STDOUT:
  354. // CHECK:STDOUT: impl: %.loc14_21 as %Interface.ref.loc14 {
  355. // CHECK:STDOUT: !members:
  356. // CHECK:STDOUT: witness = file.%Interface.impl_witness.loc14
  357. // CHECK:STDOUT: }
  358. // CHECK:STDOUT: }
  359. // CHECK:STDOUT:
  360. // CHECK:STDOUT: generic impl @T.binding.as_type.as.Interface.impl.f56(%T.loc15_14.1: %L.type) {
  361. // CHECK:STDOUT: %T.loc15_14.2: %L.type = symbolic_binding T, 0 [symbolic = %T.loc15_14.2 (constants.%T.b43)]
  362. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc15_14.2 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.66e)]
  363. // CHECK:STDOUT: %Interface.impl_witness: <witness> = impl_witness file.%Interface.impl_witness_table.loc15, @T.binding.as_type.as.Interface.impl.f56(%T.loc15_14.2) [symbolic = %Interface.impl_witness (constants.%Interface.impl_witness.b8c)]
  364. // CHECK:STDOUT:
  365. // CHECK:STDOUT: !definition:
  366. // CHECK:STDOUT:
  367. // CHECK:STDOUT: impl: %.loc15_21 as %Interface.ref.loc15 {
  368. // CHECK:STDOUT: !members:
  369. // CHECK:STDOUT: witness = file.%Interface.impl_witness.loc15
  370. // CHECK:STDOUT: }
  371. // CHECK:STDOUT: }
  372. // CHECK:STDOUT:
  373. // CHECK:STDOUT: specific @T.binding.as_type.as.Interface.impl.de7(constants.%T.9f2) {
  374. // CHECK:STDOUT: %T.loc12_14.2 => constants.%T.9f2
  375. // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type.bcb
  376. // CHECK:STDOUT: %Interface.impl_witness => constants.%Interface.impl_witness.71f
  377. // CHECK:STDOUT: }
  378. // CHECK:STDOUT:
  379. // CHECK:STDOUT: specific @T.binding.as_type.as.Interface.impl.af4(constants.%T.dc6) {
  380. // CHECK:STDOUT: %T.loc13_14.2 => constants.%T.dc6
  381. // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type.1fa
  382. // CHECK:STDOUT: %Interface.impl_witness => constants.%Interface.impl_witness.fb4
  383. // CHECK:STDOUT: }
  384. // CHECK:STDOUT:
  385. // CHECK:STDOUT: specific @T.binding.as_type.as.Interface.impl.f9f(constants.%T.999) {
  386. // CHECK:STDOUT: %T.loc14_14.2 => constants.%T.999
  387. // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type.1c0
  388. // CHECK:STDOUT: %Interface.impl_witness => constants.%Interface.impl_witness.1fb
  389. // CHECK:STDOUT: }
  390. // CHECK:STDOUT:
  391. // CHECK:STDOUT: specific @T.binding.as_type.as.Interface.impl.f56(constants.%T.b43) {
  392. // CHECK:STDOUT: %T.loc15_14.2 => constants.%T.b43
  393. // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type.66e
  394. // CHECK:STDOUT: %Interface.impl_witness => constants.%Interface.impl_witness.b8c
  395. // CHECK:STDOUT: }
  396. // CHECK:STDOUT:
  397. // CHECK:STDOUT: --- fail_same_self_and_interface_redefined.carbon
  398. // CHECK:STDOUT:
  399. // CHECK:STDOUT: constants {
  400. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  401. // CHECK:STDOUT: %Self.9f2: %I.type = symbolic_binding Self, 0 [symbolic]
  402. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  403. // CHECK:STDOUT: %Self.dc6: %J.type = symbolic_binding Self, 0 [symbolic]
  404. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  405. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  406. // CHECK:STDOUT: %T: %I.type = symbolic_binding T, 0 [symbolic]
  407. // CHECK:STDOUT: %pattern_type: type = pattern_type %I.type [concrete]
  408. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
  409. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness file.%J.impl_witness_table, @T.binding.as_type.as.J.impl.8399b6.1(%T) [symbolic]
  410. // CHECK:STDOUT: }
  411. // CHECK:STDOUT:
  412. // CHECK:STDOUT: imports {
  413. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  414. // CHECK:STDOUT: import Core//prelude
  415. // CHECK:STDOUT: import Core//prelude/...
  416. // CHECK:STDOUT: }
  417. // CHECK:STDOUT: }
  418. // CHECK:STDOUT:
  419. // CHECK:STDOUT: file {
  420. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  421. // CHECK:STDOUT: .Core = imports.%Core
  422. // CHECK:STDOUT: .I = %I.decl
  423. // CHECK:STDOUT: .J = %J.decl
  424. // CHECK:STDOUT: }
  425. // CHECK:STDOUT: %Core.import = import Core
  426. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  427. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  428. // CHECK:STDOUT: impl_decl @T.binding.as_type.as.J.impl.8399b6.1 [concrete] {
  429. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  430. // CHECK:STDOUT: } {
  431. // CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc7_14.1 [symbolic = %T.loc7_14.2 (constants.%T)]
  432. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  433. // CHECK:STDOUT: %.loc7_21: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  434. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  435. // CHECK:STDOUT: %.loc7_18: type = splice_block %I.ref [concrete = constants.%I.type] {
  436. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  437. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  438. // CHECK:STDOUT: }
  439. // CHECK:STDOUT: %T.loc7_14.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc7_14.2 (constants.%T)]
  440. // CHECK:STDOUT: }
  441. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (), @T.binding.as_type.as.J.impl.8399b6.1 [concrete]
  442. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table, @T.binding.as_type.as.J.impl.8399b6.1(constants.%T) [symbolic = @T.binding.as_type.as.J.impl.8399b6.1.%J.impl_witness (constants.%J.impl_witness)]
  443. // CHECK:STDOUT: impl_decl @T.binding.as_type.as.J.impl.8399b6.2 [concrete] {
  444. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  445. // CHECK:STDOUT: } {
  446. // CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc15_14.1 [symbolic = %T.loc15_14.2 (constants.%T)]
  447. // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  448. // CHECK:STDOUT: %.loc15_21: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  449. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  450. // CHECK:STDOUT: %.loc15_18: type = splice_block %I.ref [concrete = constants.%I.type] {
  451. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  452. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  453. // CHECK:STDOUT: }
  454. // CHECK:STDOUT: %T.loc15_14.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc15_14.2 (constants.%T)]
  455. // CHECK:STDOUT: }
  456. // CHECK:STDOUT: }
  457. // CHECK:STDOUT:
  458. // CHECK:STDOUT: interface @I {
  459. // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.9f2]
  460. // CHECK:STDOUT:
  461. // CHECK:STDOUT: !members:
  462. // CHECK:STDOUT: .Self = %Self
  463. // CHECK:STDOUT: witness = ()
  464. // CHECK:STDOUT:
  465. // CHECK:STDOUT: !requires:
  466. // CHECK:STDOUT: }
  467. // CHECK:STDOUT:
  468. // CHECK:STDOUT: interface @J {
  469. // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.dc6]
  470. // CHECK:STDOUT:
  471. // CHECK:STDOUT: !members:
  472. // CHECK:STDOUT: .Self = %Self
  473. // CHECK:STDOUT: witness = ()
  474. // CHECK:STDOUT:
  475. // CHECK:STDOUT: !requires:
  476. // CHECK:STDOUT: }
  477. // CHECK:STDOUT:
  478. // CHECK:STDOUT: generic impl @T.binding.as_type.as.J.impl.8399b6.1(%T.loc7_14.1: %I.type) {
  479. // CHECK:STDOUT: %T.loc7_14.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc7_14.2 (constants.%T)]
  480. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc7_14.2 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  481. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness file.%J.impl_witness_table, @T.binding.as_type.as.J.impl.8399b6.1(%T.loc7_14.2) [symbolic = %J.impl_witness (constants.%J.impl_witness)]
  482. // CHECK:STDOUT:
  483. // CHECK:STDOUT: !definition:
  484. // CHECK:STDOUT:
  485. // CHECK:STDOUT: impl: %.loc7_21 as %J.ref {
  486. // CHECK:STDOUT: !members:
  487. // CHECK:STDOUT: witness = file.%J.impl_witness
  488. // CHECK:STDOUT: }
  489. // CHECK:STDOUT: }
  490. // CHECK:STDOUT:
  491. // CHECK:STDOUT: generic impl @T.binding.as_type.as.J.impl.8399b6.2(%T.loc15_14.1: %I.type) {
  492. // CHECK:STDOUT: %T.loc15_14.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc15_14.2 (constants.%T)]
  493. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc15_14.2 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  494. // CHECK:STDOUT:
  495. // CHECK:STDOUT: !definition:
  496. // CHECK:STDOUT:
  497. // CHECK:STDOUT: impl: %.loc15_21 as %J.ref {
  498. // CHECK:STDOUT: !members:
  499. // CHECK:STDOUT: witness = <error>
  500. // CHECK:STDOUT: }
  501. // CHECK:STDOUT: }
  502. // CHECK:STDOUT:
  503. // CHECK:STDOUT: specific @T.binding.as_type.as.J.impl.8399b6.1(constants.%T) {
  504. // CHECK:STDOUT: %T.loc7_14.2 => constants.%T
  505. // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
  506. // CHECK:STDOUT: %J.impl_witness => constants.%J.impl_witness
  507. // CHECK:STDOUT: }
  508. // CHECK:STDOUT:
  509. // CHECK:STDOUT: specific @T.binding.as_type.as.J.impl.8399b6.2(constants.%T) {
  510. // CHECK:STDOUT: %T.loc15_14.2 => constants.%T
  511. // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
  512. // CHECK:STDOUT: }
  513. // CHECK:STDOUT:
  514. // CHECK:STDOUT: --- fail_same_type_different_spelling.carbon
  515. // CHECK:STDOUT:
  516. // CHECK:STDOUT: constants {
  517. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  518. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  519. // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic]
  520. // CHECK:STDOUT: %I.impl_witness.f6038c.1: <witness> = impl_witness file.%I.impl_witness_table.loc9 [concrete]
  521. // CHECK:STDOUT: %tuple.type: type = tuple_type (type, type) [concrete]
  522. // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%C, %C) [concrete]
  523. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  524. // CHECK:STDOUT: %I.impl_witness.f6038c.2: <witness> = impl_witness file.%I.impl_witness_table.loc17 [concrete]
  525. // CHECK:STDOUT: }
  526. // CHECK:STDOUT:
  527. // CHECK:STDOUT: imports {
  528. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  529. // CHECK:STDOUT: import Core//prelude
  530. // CHECK:STDOUT: import Core//prelude/...
  531. // CHECK:STDOUT: }
  532. // CHECK:STDOUT: }
  533. // CHECK:STDOUT:
  534. // CHECK:STDOUT: file {
  535. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  536. // CHECK:STDOUT: .Core = imports.%Core
  537. // CHECK:STDOUT: .C = %C.decl
  538. // CHECK:STDOUT: .I = %I.decl
  539. // CHECK:STDOUT: }
  540. // CHECK:STDOUT: %Core.import = import Core
  541. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  542. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  543. // CHECK:STDOUT: impl_decl @C.as.I.impl.7de31e.1 [concrete] {} {
  544. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
  545. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  546. // CHECK:STDOUT: }
  547. // CHECK:STDOUT: %I.impl_witness_table.loc9 = impl_witness_table (), @C.as.I.impl.7de31e.1 [concrete]
  548. // CHECK:STDOUT: %I.impl_witness.loc9: <witness> = impl_witness %I.impl_witness_table.loc9 [concrete = constants.%I.impl_witness.f6038c.1]
  549. // CHECK:STDOUT: impl_decl @C.as.I.impl.7de31e.2 [concrete] {} {
  550. // CHECK:STDOUT: %C.ref.loc17_7: type = name_ref C, file.%C.decl [concrete = constants.%C]
  551. // CHECK:STDOUT: %C.ref.loc17_10: type = name_ref C, file.%C.decl [concrete = constants.%C]
  552. // CHECK:STDOUT: %.loc17_11.1: %tuple.type = tuple_literal (%C.ref.loc17_7, %C.ref.loc17_10) [concrete = constants.%tuple]
  553. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  554. // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%C.ref.loc17_7, %C.ref.loc17_10) [concrete = constants.%tuple]
  555. // CHECK:STDOUT: %.loc17_11.2: %tuple.type = converted %.loc17_11.1, %tuple [concrete = constants.%tuple]
  556. // CHECK:STDOUT: %tuple.elem0: type = tuple_access %.loc17_11.2, element0 [concrete = constants.%C]
  557. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  558. // CHECK:STDOUT: }
  559. // CHECK:STDOUT: %I.impl_witness_table.loc17 = impl_witness_table (), @C.as.I.impl.7de31e.2 [concrete]
  560. // CHECK:STDOUT: %I.impl_witness.loc17: <witness> = impl_witness %I.impl_witness_table.loc17 [concrete = constants.%I.impl_witness.f6038c.2]
  561. // CHECK:STDOUT: }
  562. // CHECK:STDOUT:
  563. // CHECK:STDOUT: interface @I {
  564. // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  565. // CHECK:STDOUT:
  566. // CHECK:STDOUT: !members:
  567. // CHECK:STDOUT: .Self = %Self
  568. // CHECK:STDOUT: witness = ()
  569. // CHECK:STDOUT:
  570. // CHECK:STDOUT: !requires:
  571. // CHECK:STDOUT: }
  572. // CHECK:STDOUT:
  573. // CHECK:STDOUT: impl @C.as.I.impl.7de31e.1: %C.ref as %I.ref {
  574. // CHECK:STDOUT: !members:
  575. // CHECK:STDOUT: witness = file.%I.impl_witness.loc9
  576. // CHECK:STDOUT: }
  577. // CHECK:STDOUT:
  578. // CHECK:STDOUT: impl @C.as.I.impl.7de31e.2: %tuple.elem0 as %I.ref {
  579. // CHECK:STDOUT: !members:
  580. // CHECK:STDOUT: witness = file.%I.impl_witness.loc17
  581. // CHECK:STDOUT: }
  582. // CHECK:STDOUT:
  583. // CHECK:STDOUT: class @C;
  584. // CHECK:STDOUT:
  585. // CHECK:STDOUT: --- fail_redefinition_generic_regions.carbon
  586. // CHECK:STDOUT:
  587. // CHECK:STDOUT: constants {
  588. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  589. // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic]
  590. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  591. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  592. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  593. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  594. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness file.%I.impl_witness_table, @T.as.I.impl.381c92.1(%T) [symbolic]
  595. // CHECK:STDOUT: %T.as.I.impl.A.type: type = fn_type @T.as.I.impl.A, @T.as.I.impl.381c92.1(%T) [symbolic]
  596. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  597. // CHECK:STDOUT: %T.as.I.impl.A: %T.as.I.impl.A.type = struct_value () [symbolic]
  598. // CHECK:STDOUT: %T.as.I.impl.B.type: type = fn_type @T.as.I.impl.B, @T.as.I.impl.381c92.2(%T) [symbolic]
  599. // CHECK:STDOUT: %T.as.I.impl.B: %T.as.I.impl.B.type = struct_value () [symbolic]
  600. // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
  601. // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
  602. // CHECK:STDOUT: %T.as.I.impl.C.type: type = fn_type @T.as.I.impl.C, @T.as.I.impl.381c92.2(%T) [symbolic]
  603. // CHECK:STDOUT: %T.as.I.impl.C: %T.as.I.impl.C.type = struct_value () [symbolic]
  604. // CHECK:STDOUT: %T.as.I.impl.D.type: type = fn_type @T.as.I.impl.D, @T.as.I.impl.381c92.2(%T) [symbolic]
  605. // CHECK:STDOUT: %T.as.I.impl.D: %T.as.I.impl.D.type = struct_value () [symbolic]
  606. // CHECK:STDOUT: %T.as.I.impl.C.specific_fn: <specific function> = specific_function %T.as.I.impl.C, @T.as.I.impl.C(%T) [symbolic]
  607. // CHECK:STDOUT: }
  608. // CHECK:STDOUT:
  609. // CHECK:STDOUT: imports {
  610. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  611. // CHECK:STDOUT: import Core//prelude
  612. // CHECK:STDOUT: import Core//prelude/...
  613. // CHECK:STDOUT: }
  614. // CHECK:STDOUT: }
  615. // CHECK:STDOUT:
  616. // CHECK:STDOUT: file {
  617. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  618. // CHECK:STDOUT: .Core = imports.%Core
  619. // CHECK:STDOUT: .I = %I.decl
  620. // CHECK:STDOUT: }
  621. // CHECK:STDOUT: %Core.import = import Core
  622. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  623. // CHECK:STDOUT: impl_decl @T.as.I.impl.381c92.1 [concrete] {
  624. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  625. // CHECK:STDOUT: } {
  626. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_14.2 [symbolic = %T.loc4_14.1 (constants.%T)]
  627. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  628. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  629. // CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)]
  630. // CHECK:STDOUT: }
  631. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @T.as.I.impl.381c92.1 [concrete]
  632. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table, @T.as.I.impl.381c92.1(constants.%T) [symbolic = @T.as.I.impl.381c92.1.%I.impl_witness (constants.%I.impl_witness)]
  633. // CHECK:STDOUT: impl_decl @T.as.I.impl.381c92.2 [concrete] {
  634. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  635. // CHECK:STDOUT: } {
  636. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_14.2 [symbolic = %T.loc15_14.1 (constants.%T)]
  637. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  638. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  639. // CHECK:STDOUT: %T.loc15_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_14.1 (constants.%T)]
  640. // CHECK:STDOUT: }
  641. // CHECK:STDOUT: }
  642. // CHECK:STDOUT:
  643. // CHECK:STDOUT: interface @I {
  644. // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  645. // CHECK:STDOUT:
  646. // CHECK:STDOUT: !members:
  647. // CHECK:STDOUT: .Self = %Self
  648. // CHECK:STDOUT: witness = ()
  649. // CHECK:STDOUT:
  650. // CHECK:STDOUT: !requires:
  651. // CHECK:STDOUT: }
  652. // CHECK:STDOUT:
  653. // CHECK:STDOUT: generic impl @T.as.I.impl.381c92.1(%T.loc4_14.2: type) {
  654. // CHECK:STDOUT: %T.loc4_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)]
  655. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness file.%I.impl_witness_table, @T.as.I.impl.381c92.1(%T.loc4_14.1) [symbolic = %I.impl_witness (constants.%I.impl_witness)]
  656. // CHECK:STDOUT:
  657. // CHECK:STDOUT: !definition:
  658. // CHECK:STDOUT: %T.as.I.impl.A.type: type = fn_type @T.as.I.impl.A, @T.as.I.impl.381c92.1(%T.loc4_14.1) [symbolic = %T.as.I.impl.A.type (constants.%T.as.I.impl.A.type)]
  659. // CHECK:STDOUT: %T.as.I.impl.A: @T.as.I.impl.381c92.1.%T.as.I.impl.A.type (%T.as.I.impl.A.type) = struct_value () [symbolic = %T.as.I.impl.A (constants.%T.as.I.impl.A)]
  660. // CHECK:STDOUT:
  661. // CHECK:STDOUT: impl: %T.ref as %I.ref {
  662. // CHECK:STDOUT: %T.as.I.impl.A.decl: @T.as.I.impl.381c92.1.%T.as.I.impl.A.type (%T.as.I.impl.A.type) = fn_decl @T.as.I.impl.A [symbolic = @T.as.I.impl.381c92.1.%T.as.I.impl.A (constants.%T.as.I.impl.A)] {} {}
  663. // CHECK:STDOUT:
  664. // CHECK:STDOUT: !members:
  665. // CHECK:STDOUT: .A = %T.as.I.impl.A.decl
  666. // CHECK:STDOUT: witness = file.%I.impl_witness
  667. // CHECK:STDOUT: }
  668. // CHECK:STDOUT: }
  669. // CHECK:STDOUT:
  670. // CHECK:STDOUT: generic impl @T.as.I.impl.381c92.2(%T.loc15_14.2: type) {
  671. // CHECK:STDOUT: %T.loc15_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_14.1 (constants.%T)]
  672. // CHECK:STDOUT:
  673. // CHECK:STDOUT: !definition:
  674. // CHECK:STDOUT: %T.as.I.impl.B.type: type = fn_type @T.as.I.impl.B, @T.as.I.impl.381c92.2(%T.loc15_14.1) [symbolic = %T.as.I.impl.B.type (constants.%T.as.I.impl.B.type)]
  675. // CHECK:STDOUT: %T.as.I.impl.B: @T.as.I.impl.381c92.2.%T.as.I.impl.B.type (%T.as.I.impl.B.type) = struct_value () [symbolic = %T.as.I.impl.B (constants.%T.as.I.impl.B)]
  676. // CHECK:STDOUT: %T.as.I.impl.C.type: type = fn_type @T.as.I.impl.C, @T.as.I.impl.381c92.2(%T.loc15_14.1) [symbolic = %T.as.I.impl.C.type (constants.%T.as.I.impl.C.type)]
  677. // CHECK:STDOUT: %T.as.I.impl.C: @T.as.I.impl.381c92.2.%T.as.I.impl.C.type (%T.as.I.impl.C.type) = struct_value () [symbolic = %T.as.I.impl.C (constants.%T.as.I.impl.C)]
  678. // CHECK:STDOUT: %T.as.I.impl.D.type: type = fn_type @T.as.I.impl.D, @T.as.I.impl.381c92.2(%T.loc15_14.1) [symbolic = %T.as.I.impl.D.type (constants.%T.as.I.impl.D.type)]
  679. // CHECK:STDOUT: %T.as.I.impl.D: @T.as.I.impl.381c92.2.%T.as.I.impl.D.type (%T.as.I.impl.D.type) = struct_value () [symbolic = %T.as.I.impl.D (constants.%T.as.I.impl.D)]
  680. // CHECK:STDOUT:
  681. // CHECK:STDOUT: impl: %T.ref as %I.ref {
  682. // CHECK:STDOUT: %T.as.I.impl.B.decl: @T.as.I.impl.381c92.2.%T.as.I.impl.B.type (%T.as.I.impl.B.type) = fn_decl @T.as.I.impl.B [symbolic = @T.as.I.impl.381c92.2.%T.as.I.impl.B (constants.%T.as.I.impl.B)] {} {}
  683. // CHECK:STDOUT: %T.as.I.impl.C.decl: @T.as.I.impl.381c92.2.%T.as.I.impl.C.type (%T.as.I.impl.C.type) = fn_decl @T.as.I.impl.C [symbolic = @T.as.I.impl.381c92.2.%T.as.I.impl.C (constants.%T.as.I.impl.C)] {
  684. // CHECK:STDOUT: %return.patt: %pattern_type.cb1 = return_slot_pattern [concrete]
  685. // CHECK:STDOUT: %return.param_patt: %pattern_type.cb1 = out_param_pattern %return.patt, call_param0 [concrete]
  686. // CHECK:STDOUT: } {
  687. // CHECK:STDOUT: %.loc19_14.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  688. // CHECK:STDOUT: %.loc19_14.2: type = converted %.loc19_14.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  689. // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param call_param0
  690. // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param
  691. // CHECK:STDOUT: }
  692. // CHECK:STDOUT: %T.as.I.impl.D.decl: @T.as.I.impl.381c92.2.%T.as.I.impl.D.type (%T.as.I.impl.D.type) = fn_decl @T.as.I.impl.D [symbolic = @T.as.I.impl.381c92.2.%T.as.I.impl.D (constants.%T.as.I.impl.D)] {
  693. // CHECK:STDOUT: %return.patt: %pattern_type.cb1 = return_slot_pattern [concrete]
  694. // CHECK:STDOUT: %return.param_patt: %pattern_type.cb1 = out_param_pattern %return.patt, call_param0 [concrete]
  695. // CHECK:STDOUT: } {
  696. // CHECK:STDOUT: %.loc20_14.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  697. // CHECK:STDOUT: %.loc20_14.2: type = converted %.loc20_14.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  698. // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param call_param0
  699. // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param
  700. // CHECK:STDOUT: }
  701. // CHECK:STDOUT:
  702. // CHECK:STDOUT: !members:
  703. // CHECK:STDOUT: .B = %T.as.I.impl.B.decl
  704. // CHECK:STDOUT: .C = %T.as.I.impl.C.decl
  705. // CHECK:STDOUT: .D = %T.as.I.impl.D.decl
  706. // CHECK:STDOUT: witness = <error>
  707. // CHECK:STDOUT: }
  708. // CHECK:STDOUT: }
  709. // CHECK:STDOUT:
  710. // CHECK:STDOUT: generic fn @T.as.I.impl.A(@T.as.I.impl.381c92.1.%T.loc4_14.2: type) {
  711. // CHECK:STDOUT: !definition:
  712. // CHECK:STDOUT:
  713. // CHECK:STDOUT: fn() {
  714. // CHECK:STDOUT: !entry:
  715. // CHECK:STDOUT: return
  716. // CHECK:STDOUT: }
  717. // CHECK:STDOUT: }
  718. // CHECK:STDOUT:
  719. // CHECK:STDOUT: generic fn @T.as.I.impl.B(@T.as.I.impl.381c92.2.%T.loc15_14.2: type) {
  720. // CHECK:STDOUT: !definition:
  721. // CHECK:STDOUT:
  722. // CHECK:STDOUT: fn() {
  723. // CHECK:STDOUT: !entry:
  724. // CHECK:STDOUT: return
  725. // CHECK:STDOUT: }
  726. // CHECK:STDOUT: }
  727. // CHECK:STDOUT:
  728. // CHECK:STDOUT: generic fn @T.as.I.impl.C(@T.as.I.impl.381c92.2.%T.loc15_14.2: type) {
  729. // CHECK:STDOUT: !definition:
  730. // CHECK:STDOUT:
  731. // CHECK:STDOUT: fn() -> %empty_tuple.type {
  732. // CHECK:STDOUT: !entry:
  733. // CHECK:STDOUT: %.loc19_26.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  734. // CHECK:STDOUT: %.loc19_26.2: init %empty_tuple.type = tuple_init () to %return [concrete = constants.%empty_tuple]
  735. // CHECK:STDOUT: %.loc19_27: init %empty_tuple.type = converted %.loc19_26.1, %.loc19_26.2 [concrete = constants.%empty_tuple]
  736. // CHECK:STDOUT: return %.loc19_27 to %return
  737. // CHECK:STDOUT: }
  738. // CHECK:STDOUT: }
  739. // CHECK:STDOUT:
  740. // CHECK:STDOUT: generic fn @T.as.I.impl.D(@T.as.I.impl.381c92.2.%T.loc15_14.2: type) {
  741. // CHECK:STDOUT: !definition:
  742. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  743. // CHECK:STDOUT: %T.as.I.impl.C.type: type = fn_type @T.as.I.impl.C, @T.as.I.impl.381c92.2(%T) [symbolic = %T.as.I.impl.C.type (constants.%T.as.I.impl.C.type)]
  744. // CHECK:STDOUT: %T.as.I.impl.C: @T.as.I.impl.D.%T.as.I.impl.C.type (%T.as.I.impl.C.type) = struct_value () [symbolic = %T.as.I.impl.C (constants.%T.as.I.impl.C)]
  745. // CHECK:STDOUT: %T.as.I.impl.C.specific_fn.loc21_12.2: <specific function> = specific_function %T.as.I.impl.C, @T.as.I.impl.C(%T) [symbolic = %T.as.I.impl.C.specific_fn.loc21_12.2 (constants.%T.as.I.impl.C.specific_fn)]
  746. // CHECK:STDOUT:
  747. // CHECK:STDOUT: fn() -> %empty_tuple.type {
  748. // CHECK:STDOUT: !entry:
  749. // CHECK:STDOUT: %.loc21: @T.as.I.impl.D.%T.as.I.impl.C.type (%T.as.I.impl.C.type) = specific_constant @T.as.I.impl.381c92.2.%T.as.I.impl.C.decl, @T.as.I.impl.381c92.2(constants.%T) [symbolic = %T.as.I.impl.C (constants.%T.as.I.impl.C)]
  750. // CHECK:STDOUT: %C.ref: @T.as.I.impl.D.%T.as.I.impl.C.type (%T.as.I.impl.C.type) = name_ref C, %.loc21 [symbolic = %T.as.I.impl.C (constants.%T.as.I.impl.C)]
  751. // CHECK:STDOUT: %T.as.I.impl.C.specific_fn.loc21_12.1: <specific function> = specific_function %C.ref, @T.as.I.impl.C(constants.%T) [symbolic = %T.as.I.impl.C.specific_fn.loc21_12.2 (constants.%T.as.I.impl.C.specific_fn)]
  752. // CHECK:STDOUT: %T.as.I.impl.C.call: init %empty_tuple.type = call %T.as.I.impl.C.specific_fn.loc21_12.1()
  753. // CHECK:STDOUT: return %T.as.I.impl.C.call to %return
  754. // CHECK:STDOUT: }
  755. // CHECK:STDOUT: }
  756. // CHECK:STDOUT:
  757. // CHECK:STDOUT: specific @T.as.I.impl.381c92.1(constants.%T) {
  758. // CHECK:STDOUT: %T.loc4_14.1 => constants.%T
  759. // CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness
  760. // CHECK:STDOUT:
  761. // CHECK:STDOUT: !definition:
  762. // CHECK:STDOUT: %T.as.I.impl.A.type => constants.%T.as.I.impl.A.type
  763. // CHECK:STDOUT: %T.as.I.impl.A => constants.%T.as.I.impl.A
  764. // CHECK:STDOUT: }
  765. // CHECK:STDOUT:
  766. // CHECK:STDOUT: specific @T.as.I.impl.A(constants.%T) {}
  767. // CHECK:STDOUT:
  768. // CHECK:STDOUT: specific @T.as.I.impl.381c92.2(constants.%T) {
  769. // CHECK:STDOUT: %T.loc15_14.1 => constants.%T
  770. // CHECK:STDOUT:
  771. // CHECK:STDOUT: !definition:
  772. // CHECK:STDOUT: %T.as.I.impl.B.type => constants.%T.as.I.impl.B.type
  773. // CHECK:STDOUT: %T.as.I.impl.B => constants.%T.as.I.impl.B
  774. // CHECK:STDOUT: %T.as.I.impl.C.type => constants.%T.as.I.impl.C.type
  775. // CHECK:STDOUT: %T.as.I.impl.C => constants.%T.as.I.impl.C
  776. // CHECK:STDOUT: %T.as.I.impl.D.type => constants.%T.as.I.impl.D.type
  777. // CHECK:STDOUT: %T.as.I.impl.D => constants.%T.as.I.impl.D
  778. // CHECK:STDOUT: }
  779. // CHECK:STDOUT:
  780. // CHECK:STDOUT: specific @T.as.I.impl.B(constants.%T) {}
  781. // CHECK:STDOUT:
  782. // CHECK:STDOUT: specific @T.as.I.impl.C(constants.%T) {
  783. // CHECK:STDOUT: !definition:
  784. // CHECK:STDOUT: }
  785. // CHECK:STDOUT:
  786. // CHECK:STDOUT: specific @T.as.I.impl.D(constants.%T) {}
  787. // CHECK:STDOUT: