call.carbon 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819
  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. // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
  6. // EXTRA-ARGS: --dump-sem-ir-ranges=if-present
  7. //
  8. // AUTOUPDATE
  9. // TIP: To test this file alone, run:
  10. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/class/generic/call.carbon
  11. // TIP: To dump output, run:
  12. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/generic/call.carbon
  13. // --- call.carbon
  14. library "[[@TEST_NAME]]";
  15. class Class(T:! type, N:! i32) {}
  16. var a: Class(i32*, 5);
  17. // Requires an implicit conversion to type `type`.
  18. var b: Class((), 0);
  19. // --- fail_too_few.carbon
  20. library "[[@TEST_NAME]]";
  21. class Class(T:! type, N:! i32) {}
  22. // CHECK:STDERR: fail_too_few.carbon:[[@LINE+7]]:8: error: 1 argument passed to generic class expecting 2 arguments [CallArgCountMismatch]
  23. // CHECK:STDERR: var a: Class(i32*);
  24. // CHECK:STDERR: ^~~~~~~~~~~
  25. // CHECK:STDERR: fail_too_few.carbon:[[@LINE-5]]:1: note: calling generic class declared here [InCallToEntity]
  26. // CHECK:STDERR: class Class(T:! type, N:! i32) {}
  27. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  28. // CHECK:STDERR:
  29. var a: Class(i32*);
  30. // --- fail_too_many.carbon
  31. library "[[@TEST_NAME]]";
  32. class Class(T:! type, N:! i32) {}
  33. // CHECK:STDERR: fail_too_many.carbon:[[@LINE+7]]:8: error: 3 arguments passed to generic class expecting 2 arguments [CallArgCountMismatch]
  34. // CHECK:STDERR: var a: Class(i32*, 1, 2);
  35. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~
  36. // CHECK:STDERR: fail_too_many.carbon:[[@LINE-5]]:1: note: calling generic class declared here [InCallToEntity]
  37. // CHECK:STDERR: class Class(T:! type, N:! i32) {}
  38. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  39. // CHECK:STDERR:
  40. var a: Class(i32*, 1, 2);
  41. // --- fail_no_conversion.carbon
  42. library "[[@TEST_NAME]]";
  43. class Class(T:! type, N:! i32) {}
  44. // CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+10]]:8: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet]
  45. // CHECK:STDERR: var a: Class(5, i32*);
  46. // CHECK:STDERR: ^~~~~~~~~~~~~~
  47. // CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+7]]:8: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
  48. // CHECK:STDERR: var a: Class(5, i32*);
  49. // CHECK:STDERR: ^~~~~~~~~~~~~~
  50. // CHECK:STDERR: fail_no_conversion.carbon:[[@LINE-8]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam]
  51. // CHECK:STDERR: class Class(T:! type, N:! i32) {}
  52. // CHECK:STDERR: ^
  53. // CHECK:STDERR:
  54. var a: Class(5, i32*);
  55. // --- call_in_nested_return_type.carbon
  56. class Outer(T:! type) {
  57. class Inner(U:! type) {
  58. fn A() -> Outer(T) {
  59. return {};
  60. }
  61. fn B() -> Outer(U) {
  62. return {};
  63. }
  64. fn C() -> Inner(T) {
  65. return {};
  66. }
  67. fn D() -> Inner(U) {
  68. return {};
  69. }
  70. }
  71. }
  72. // CHECK:STDOUT: --- call.carbon
  73. // CHECK:STDOUT:
  74. // CHECK:STDOUT: constants {
  75. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  76. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  77. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  78. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  79. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  80. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  81. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  82. // CHECK:STDOUT: %N.356: %i32 = bind_symbolic_name N, 1 [symbolic]
  83. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  84. // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [concrete]
  85. // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [concrete]
  86. // CHECK:STDOUT: %Class.ab2: type = class_type @Class, @Class(%T, %N.356) [symbolic]
  87. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  88. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  89. // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete]
  90. // CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete]
  91. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  92. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  93. // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  94. // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete]
  95. // CHECK:STDOUT: %To.c80: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
  96. // CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2, @impl.4f9(%To.c80) [symbolic]
  97. // CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic]
  98. // CHECK:STDOUT: %ImplicitAs.impl_witness.c75: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete]
  99. // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete]
  100. // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete]
  101. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete]
  102. // CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete]
  103. // CHECK:STDOUT: %Convert.bound.4e6: <bound method> = bound_method %int_5.64b, %Convert.956 [concrete]
  104. // CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.956, @Convert.2(%int_32) [concrete]
  105. // CHECK:STDOUT: %bound_method.a25: <bound method> = bound_method %int_5.64b, %Convert.specific_fn [concrete]
  106. // CHECK:STDOUT: %int_5.0f6: %i32 = int_value 5 [concrete]
  107. // CHECK:STDOUT: %Class.f29: type = class_type @Class, @Class(%ptr.235, %int_5.0f6) [concrete]
  108. // CHECK:STDOUT: %pattern_type.d51: type = pattern_type %Class.f29 [concrete]
  109. // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete]
  110. // CHECK:STDOUT: %Convert.bound.d04: <bound method> = bound_method %int_0.5c6, %Convert.956 [concrete]
  111. // CHECK:STDOUT: %bound_method.b6e: <bound method> = bound_method %int_0.5c6, %Convert.specific_fn [concrete]
  112. // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete]
  113. // CHECK:STDOUT: %Class.dd4: type = class_type @Class, @Class(%empty_tuple.type, %int_0.6a9) [concrete]
  114. // CHECK:STDOUT: %pattern_type.c73: type = pattern_type %Class.dd4 [concrete]
  115. // CHECK:STDOUT: }
  116. // CHECK:STDOUT:
  117. // CHECK:STDOUT: imports {
  118. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  119. // CHECK:STDOUT: .Int = %Core.Int
  120. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  121. // CHECK:STDOUT: import Core//prelude
  122. // CHECK:STDOUT: import Core//prelude/...
  123. // CHECK:STDOUT: }
  124. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
  125. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  126. // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types/int, loc19_39, loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)]
  127. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete]
  128. // CHECK:STDOUT: }
  129. // CHECK:STDOUT:
  130. // CHECK:STDOUT: file {
  131. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  132. // CHECK:STDOUT: .Core = imports.%Core
  133. // CHECK:STDOUT: .Class = %Class.decl
  134. // CHECK:STDOUT: .a = %a
  135. // CHECK:STDOUT: .b = %b
  136. // CHECK:STDOUT: }
  137. // CHECK:STDOUT: %Core.import = import Core
  138. // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] {
  139. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  140. // CHECK:STDOUT: %N.patt: %pattern_type.7ce = symbolic_binding_pattern N, 1 [concrete]
  141. // CHECK:STDOUT: } {
  142. // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)]
  143. // CHECK:STDOUT: %.loc4: type = splice_block %i32 [concrete = constants.%i32] {
  144. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  145. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  146. // CHECK:STDOUT: }
  147. // CHECK:STDOUT: %N.loc4_23.1: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc4_23.2 (constants.%N.356)]
  148. // CHECK:STDOUT: }
  149. // CHECK:STDOUT: name_binding_decl {
  150. // CHECK:STDOUT: %a.patt: %pattern_type.d51 = binding_pattern a [concrete]
  151. // CHECK:STDOUT: %a.var_patt: %pattern_type.d51 = var_pattern %a.patt [concrete]
  152. // CHECK:STDOUT: }
  153. // CHECK:STDOUT: %a.var: ref %Class.f29 = var %a.var_patt [concrete]
  154. // CHECK:STDOUT: %.loc6_21.1: type = splice_block %Class.loc6 [concrete = constants.%Class.f29] {
  155. // CHECK:STDOUT: %Class.ref.loc6: %Class.type = name_ref Class, %Class.decl [concrete = constants.%Class.generic]
  156. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  157. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  158. // CHECK:STDOUT: %ptr: type = ptr_type %i32 [concrete = constants.%ptr.235]
  159. // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b]
  160. // CHECK:STDOUT: %impl.elem0.loc6: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
  161. // CHECK:STDOUT: %bound_method.loc6_21.1: <bound method> = bound_method %int_5, %impl.elem0.loc6 [concrete = constants.%Convert.bound.4e6]
  162. // CHECK:STDOUT: %specific_fn.loc6: <specific function> = specific_function %impl.elem0.loc6, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
  163. // CHECK:STDOUT: %bound_method.loc6_21.2: <bound method> = bound_method %int_5, %specific_fn.loc6 [concrete = constants.%bound_method.a25]
  164. // CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %bound_method.loc6_21.2(%int_5) [concrete = constants.%int_5.0f6]
  165. // CHECK:STDOUT: %.loc6_21.2: %i32 = value_of_initializer %int.convert_checked.loc6 [concrete = constants.%int_5.0f6]
  166. // CHECK:STDOUT: %.loc6_21.3: %i32 = converted %int_5, %.loc6_21.2 [concrete = constants.%int_5.0f6]
  167. // CHECK:STDOUT: %Class.loc6: type = class_type @Class, @Class(constants.%ptr.235, constants.%int_5.0f6) [concrete = constants.%Class.f29]
  168. // CHECK:STDOUT: }
  169. // CHECK:STDOUT: %a: ref %Class.f29 = bind_name a, %a.var
  170. // CHECK:STDOUT: name_binding_decl {
  171. // CHECK:STDOUT: %b.patt: %pattern_type.c73 = binding_pattern b [concrete]
  172. // CHECK:STDOUT: %b.var_patt: %pattern_type.c73 = var_pattern %b.patt [concrete]
  173. // CHECK:STDOUT: }
  174. // CHECK:STDOUT: %b.var: ref %Class.dd4 = var %b.var_patt [concrete]
  175. // CHECK:STDOUT: %.loc9_19.1: type = splice_block %Class.loc9 [concrete = constants.%Class.dd4] {
  176. // CHECK:STDOUT: %Class.ref.loc9: %Class.type = name_ref Class, %Class.decl [concrete = constants.%Class.generic]
  177. // CHECK:STDOUT: %.loc9_15: %empty_tuple.type = tuple_literal ()
  178. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
  179. // CHECK:STDOUT: %.loc9_19.2: type = converted %.loc9_15, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  180. // CHECK:STDOUT: %impl.elem0.loc9: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
  181. // CHECK:STDOUT: %bound_method.loc9_19.1: <bound method> = bound_method %int_0, %impl.elem0.loc9 [concrete = constants.%Convert.bound.d04]
  182. // CHECK:STDOUT: %specific_fn.loc9: <specific function> = specific_function %impl.elem0.loc9, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
  183. // CHECK:STDOUT: %bound_method.loc9_19.2: <bound method> = bound_method %int_0, %specific_fn.loc9 [concrete = constants.%bound_method.b6e]
  184. // CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %bound_method.loc9_19.2(%int_0) [concrete = constants.%int_0.6a9]
  185. // CHECK:STDOUT: %.loc9_19.3: %i32 = value_of_initializer %int.convert_checked.loc9 [concrete = constants.%int_0.6a9]
  186. // CHECK:STDOUT: %.loc9_19.4: %i32 = converted %int_0, %.loc9_19.3 [concrete = constants.%int_0.6a9]
  187. // CHECK:STDOUT: %Class.loc9: type = class_type @Class, @Class(constants.%empty_tuple.type, constants.%int_0.6a9) [concrete = constants.%Class.dd4]
  188. // CHECK:STDOUT: }
  189. // CHECK:STDOUT: %b: ref %Class.dd4 = bind_name b, %b.var
  190. // CHECK:STDOUT: }
  191. // CHECK:STDOUT:
  192. // CHECK:STDOUT: generic class @Class(%T.loc4_13.1: type, %N.loc4_23.1: %i32) {
  193. // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)]
  194. // CHECK:STDOUT: %N.loc4_23.2: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc4_23.2 (constants.%N.356)]
  195. // CHECK:STDOUT:
  196. // CHECK:STDOUT: !definition:
  197. // CHECK:STDOUT:
  198. // CHECK:STDOUT: class {
  199. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  200. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  201. // CHECK:STDOUT: complete_type_witness = %complete_type
  202. // CHECK:STDOUT:
  203. // CHECK:STDOUT: !members:
  204. // CHECK:STDOUT: .Self = constants.%Class.ab2
  205. // CHECK:STDOUT: }
  206. // CHECK:STDOUT: }
  207. // CHECK:STDOUT:
  208. // CHECK:STDOUT: specific @Class(constants.%T, constants.%N.356) {
  209. // CHECK:STDOUT: %T.loc4_13.2 => constants.%T
  210. // CHECK:STDOUT: %N.loc4_23.2 => constants.%N.356
  211. // CHECK:STDOUT: }
  212. // CHECK:STDOUT:
  213. // CHECK:STDOUT: specific @Class(constants.%ptr.235, constants.%int_5.0f6) {
  214. // CHECK:STDOUT: %T.loc4_13.2 => constants.%ptr.235
  215. // CHECK:STDOUT: %N.loc4_23.2 => constants.%int_5.0f6
  216. // CHECK:STDOUT:
  217. // CHECK:STDOUT: !definition:
  218. // CHECK:STDOUT: }
  219. // CHECK:STDOUT:
  220. // CHECK:STDOUT: specific @Class(constants.%empty_tuple.type, constants.%int_0.6a9) {
  221. // CHECK:STDOUT: %T.loc4_13.2 => constants.%empty_tuple.type
  222. // CHECK:STDOUT: %N.loc4_23.2 => constants.%int_0.6a9
  223. // CHECK:STDOUT:
  224. // CHECK:STDOUT: !definition:
  225. // CHECK:STDOUT: }
  226. // CHECK:STDOUT:
  227. // CHECK:STDOUT: --- fail_too_few.carbon
  228. // CHECK:STDOUT:
  229. // CHECK:STDOUT: constants {
  230. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  231. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  232. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  233. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  234. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  235. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  236. // CHECK:STDOUT: %N.356: %i32 = bind_symbolic_name N, 1 [symbolic]
  237. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  238. // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [concrete]
  239. // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [concrete]
  240. // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T, %N.356) [symbolic]
  241. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  242. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  243. // CHECK:STDOUT: %ptr: type = ptr_type %i32 [concrete]
  244. // CHECK:STDOUT: }
  245. // CHECK:STDOUT:
  246. // CHECK:STDOUT: imports {
  247. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  248. // CHECK:STDOUT: .Int = %Core.Int
  249. // CHECK:STDOUT: import Core//prelude
  250. // CHECK:STDOUT: import Core//prelude/...
  251. // CHECK:STDOUT: }
  252. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
  253. // CHECK:STDOUT: }
  254. // CHECK:STDOUT:
  255. // CHECK:STDOUT: file {
  256. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  257. // CHECK:STDOUT: .Core = imports.%Core
  258. // CHECK:STDOUT: .Class = %Class.decl
  259. // CHECK:STDOUT: .a = %a
  260. // CHECK:STDOUT: }
  261. // CHECK:STDOUT: %Core.import = import Core
  262. // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] {
  263. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  264. // CHECK:STDOUT: %N.patt: %pattern_type.7ce = symbolic_binding_pattern N, 1 [concrete]
  265. // CHECK:STDOUT: } {
  266. // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)]
  267. // CHECK:STDOUT: %.loc4: type = splice_block %i32 [concrete = constants.%i32] {
  268. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  269. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  270. // CHECK:STDOUT: }
  271. // CHECK:STDOUT: %N.loc4_23.1: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc4_23.2 (constants.%N.356)]
  272. // CHECK:STDOUT: }
  273. // CHECK:STDOUT: name_binding_decl {
  274. // CHECK:STDOUT: %a.patt: <error> = binding_pattern a [concrete]
  275. // CHECK:STDOUT: %a.var_patt: <error> = var_pattern %a.patt [concrete]
  276. // CHECK:STDOUT: }
  277. // CHECK:STDOUT: %a.var: ref <error> = var %a.var_patt [concrete = <error>]
  278. // CHECK:STDOUT: %.1: <error> = splice_block <error> [concrete = <error>] {
  279. // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [concrete = constants.%Class.generic]
  280. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  281. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  282. // CHECK:STDOUT: %ptr: type = ptr_type %i32 [concrete = constants.%ptr]
  283. // CHECK:STDOUT: }
  284. // CHECK:STDOUT: %a: <error> = bind_name a, <error>
  285. // CHECK:STDOUT: }
  286. // CHECK:STDOUT:
  287. // CHECK:STDOUT: generic class @Class(%T.loc4_13.1: type, %N.loc4_23.1: %i32) {
  288. // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)]
  289. // CHECK:STDOUT: %N.loc4_23.2: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc4_23.2 (constants.%N.356)]
  290. // CHECK:STDOUT:
  291. // CHECK:STDOUT: !definition:
  292. // CHECK:STDOUT:
  293. // CHECK:STDOUT: class {
  294. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  295. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  296. // CHECK:STDOUT: complete_type_witness = %complete_type
  297. // CHECK:STDOUT:
  298. // CHECK:STDOUT: !members:
  299. // CHECK:STDOUT: .Self = constants.%Class
  300. // CHECK:STDOUT: }
  301. // CHECK:STDOUT: }
  302. // CHECK:STDOUT:
  303. // CHECK:STDOUT: specific @Class(constants.%T, constants.%N.356) {
  304. // CHECK:STDOUT: %T.loc4_13.2 => constants.%T
  305. // CHECK:STDOUT: %N.loc4_23.2 => constants.%N.356
  306. // CHECK:STDOUT: }
  307. // CHECK:STDOUT:
  308. // CHECK:STDOUT: --- fail_too_many.carbon
  309. // CHECK:STDOUT:
  310. // CHECK:STDOUT: constants {
  311. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  312. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  313. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  314. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  315. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  316. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  317. // CHECK:STDOUT: %N.356: %i32 = bind_symbolic_name N, 1 [symbolic]
  318. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  319. // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [concrete]
  320. // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [concrete]
  321. // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T, %N.356) [symbolic]
  322. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  323. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  324. // CHECK:STDOUT: %ptr: type = ptr_type %i32 [concrete]
  325. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete]
  326. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete]
  327. // CHECK:STDOUT: }
  328. // CHECK:STDOUT:
  329. // CHECK:STDOUT: imports {
  330. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  331. // CHECK:STDOUT: .Int = %Core.Int
  332. // CHECK:STDOUT: import Core//prelude
  333. // CHECK:STDOUT: import Core//prelude/...
  334. // CHECK:STDOUT: }
  335. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
  336. // CHECK:STDOUT: }
  337. // CHECK:STDOUT:
  338. // CHECK:STDOUT: file {
  339. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  340. // CHECK:STDOUT: .Core = imports.%Core
  341. // CHECK:STDOUT: .Class = %Class.decl
  342. // CHECK:STDOUT: .a = %a
  343. // CHECK:STDOUT: }
  344. // CHECK:STDOUT: %Core.import = import Core
  345. // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] {
  346. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  347. // CHECK:STDOUT: %N.patt: %pattern_type.7ce = symbolic_binding_pattern N, 1 [concrete]
  348. // CHECK:STDOUT: } {
  349. // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)]
  350. // CHECK:STDOUT: %.loc4: type = splice_block %i32 [concrete = constants.%i32] {
  351. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  352. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  353. // CHECK:STDOUT: }
  354. // CHECK:STDOUT: %N.loc4_23.1: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc4_23.2 (constants.%N.356)]
  355. // CHECK:STDOUT: }
  356. // CHECK:STDOUT: name_binding_decl {
  357. // CHECK:STDOUT: %a.patt: <error> = binding_pattern a [concrete]
  358. // CHECK:STDOUT: %a.var_patt: <error> = var_pattern %a.patt [concrete]
  359. // CHECK:STDOUT: }
  360. // CHECK:STDOUT: %a.var: ref <error> = var %a.var_patt [concrete = <error>]
  361. // CHECK:STDOUT: %.1: <error> = splice_block <error> [concrete = <error>] {
  362. // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [concrete = constants.%Class.generic]
  363. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  364. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  365. // CHECK:STDOUT: %ptr: type = ptr_type %i32 [concrete = constants.%ptr]
  366. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
  367. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2]
  368. // CHECK:STDOUT: }
  369. // CHECK:STDOUT: %a: <error> = bind_name a, <error>
  370. // CHECK:STDOUT: }
  371. // CHECK:STDOUT:
  372. // CHECK:STDOUT: generic class @Class(%T.loc4_13.1: type, %N.loc4_23.1: %i32) {
  373. // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)]
  374. // CHECK:STDOUT: %N.loc4_23.2: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc4_23.2 (constants.%N.356)]
  375. // CHECK:STDOUT:
  376. // CHECK:STDOUT: !definition:
  377. // CHECK:STDOUT:
  378. // CHECK:STDOUT: class {
  379. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  380. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  381. // CHECK:STDOUT: complete_type_witness = %complete_type
  382. // CHECK:STDOUT:
  383. // CHECK:STDOUT: !members:
  384. // CHECK:STDOUT: .Self = constants.%Class
  385. // CHECK:STDOUT: }
  386. // CHECK:STDOUT: }
  387. // CHECK:STDOUT:
  388. // CHECK:STDOUT: specific @Class(constants.%T, constants.%N.356) {
  389. // CHECK:STDOUT: %T.loc4_13.2 => constants.%T
  390. // CHECK:STDOUT: %N.loc4_23.2 => constants.%N.356
  391. // CHECK:STDOUT: }
  392. // CHECK:STDOUT:
  393. // CHECK:STDOUT: --- fail_no_conversion.carbon
  394. // CHECK:STDOUT:
  395. // CHECK:STDOUT: constants {
  396. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  397. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  398. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  399. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  400. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  401. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  402. // CHECK:STDOUT: %N.356: %i32 = bind_symbolic_name N, 1 [symbolic]
  403. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  404. // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [concrete]
  405. // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [concrete]
  406. // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T, %N.356) [symbolic]
  407. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  408. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  409. // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete]
  410. // CHECK:STDOUT: %ptr: type = ptr_type %i32 [concrete]
  411. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  412. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  413. // CHECK:STDOUT: }
  414. // CHECK:STDOUT:
  415. // CHECK:STDOUT: imports {
  416. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  417. // CHECK:STDOUT: .Int = %Core.Int
  418. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  419. // CHECK:STDOUT: import Core//prelude
  420. // CHECK:STDOUT: import Core//prelude/...
  421. // CHECK:STDOUT: }
  422. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
  423. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  424. // CHECK:STDOUT: }
  425. // CHECK:STDOUT:
  426. // CHECK:STDOUT: file {
  427. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  428. // CHECK:STDOUT: .Core = imports.%Core
  429. // CHECK:STDOUT: .Class = %Class.decl
  430. // CHECK:STDOUT: .a = %a
  431. // CHECK:STDOUT: }
  432. // CHECK:STDOUT: %Core.import = import Core
  433. // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] {
  434. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  435. // CHECK:STDOUT: %N.patt: %pattern_type.7ce = symbolic_binding_pattern N, 1 [concrete]
  436. // CHECK:STDOUT: } {
  437. // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)]
  438. // CHECK:STDOUT: %.loc4: type = splice_block %i32 [concrete = constants.%i32] {
  439. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  440. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  441. // CHECK:STDOUT: }
  442. // CHECK:STDOUT: %N.loc4_23.1: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc4_23.2 (constants.%N.356)]
  443. // CHECK:STDOUT: }
  444. // CHECK:STDOUT: name_binding_decl {
  445. // CHECK:STDOUT: %a.patt: <error> = binding_pattern a [concrete]
  446. // CHECK:STDOUT: %a.var_patt: <error> = var_pattern %a.patt [concrete]
  447. // CHECK:STDOUT: }
  448. // CHECK:STDOUT: %a.var: ref <error> = var %a.var_patt [concrete = <error>]
  449. // CHECK:STDOUT: %.1: <error> = splice_block <error> [concrete = <error>] {
  450. // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [concrete = constants.%Class.generic]
  451. // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5]
  452. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  453. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  454. // CHECK:STDOUT: %ptr: type = ptr_type %i32 [concrete = constants.%ptr]
  455. // CHECK:STDOUT: %.loc16: type = converted %int_5, <error> [concrete = <error>]
  456. // CHECK:STDOUT: }
  457. // CHECK:STDOUT: %a: <error> = bind_name a, <error>
  458. // CHECK:STDOUT: }
  459. // CHECK:STDOUT:
  460. // CHECK:STDOUT: generic class @Class(%T.loc4_13.1: type, %N.loc4_23.1: %i32) {
  461. // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)]
  462. // CHECK:STDOUT: %N.loc4_23.2: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc4_23.2 (constants.%N.356)]
  463. // CHECK:STDOUT:
  464. // CHECK:STDOUT: !definition:
  465. // CHECK:STDOUT:
  466. // CHECK:STDOUT: class {
  467. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  468. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  469. // CHECK:STDOUT: complete_type_witness = %complete_type
  470. // CHECK:STDOUT:
  471. // CHECK:STDOUT: !members:
  472. // CHECK:STDOUT: .Self = constants.%Class
  473. // CHECK:STDOUT: }
  474. // CHECK:STDOUT: }
  475. // CHECK:STDOUT:
  476. // CHECK:STDOUT: specific @Class(constants.%T, constants.%N.356) {
  477. // CHECK:STDOUT: %T.loc4_13.2 => constants.%T
  478. // CHECK:STDOUT: %N.loc4_23.2 => constants.%N.356
  479. // CHECK:STDOUT: }
  480. // CHECK:STDOUT:
  481. // CHECK:STDOUT: --- call_in_nested_return_type.carbon
  482. // CHECK:STDOUT:
  483. // CHECK:STDOUT: constants {
  484. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  485. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  486. // CHECK:STDOUT: %Outer.type: type = generic_class_type @Outer [concrete]
  487. // CHECK:STDOUT: %Outer.generic: %Outer.type = struct_value () [concrete]
  488. // CHECK:STDOUT: %Outer.9d6: type = class_type @Outer, @Outer(%T) [symbolic]
  489. // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic]
  490. // CHECK:STDOUT: %Inner.type.eae: type = generic_class_type @Inner, @Outer(%T) [symbolic]
  491. // CHECK:STDOUT: %Inner.generic.137: %Inner.type.eae = struct_value () [symbolic]
  492. // CHECK:STDOUT: %Inner.c71: type = class_type @Inner, @Inner(%T, %U) [symbolic]
  493. // CHECK:STDOUT: %pattern_type.e86: type = pattern_type %Outer.9d6 [symbolic]
  494. // CHECK:STDOUT: %A.type.8d7: type = fn_type @A, @Inner(%T, %U) [symbolic]
  495. // CHECK:STDOUT: %A.d0e: %A.type.8d7 = struct_value () [symbolic]
  496. // CHECK:STDOUT: %Outer.99f: type = class_type @Outer, @Outer(%U) [symbolic]
  497. // CHECK:STDOUT: %pattern_type.089: type = pattern_type %Outer.99f [symbolic]
  498. // CHECK:STDOUT: %B.type.880: type = fn_type @B, @Inner(%T, %U) [symbolic]
  499. // CHECK:STDOUT: %B.c7b: %B.type.880 = struct_value () [symbolic]
  500. // CHECK:STDOUT: %Inner.13a: type = class_type @Inner, @Inner(%T, %T) [symbolic]
  501. // CHECK:STDOUT: %pattern_type.a60: type = pattern_type %Inner.13a [symbolic]
  502. // CHECK:STDOUT: %C.type.714: type = fn_type @C, @Inner(%T, %U) [symbolic]
  503. // CHECK:STDOUT: %C.e62: %C.type.714 = struct_value () [symbolic]
  504. // CHECK:STDOUT: %pattern_type.372: type = pattern_type %Inner.c71 [symbolic]
  505. // CHECK:STDOUT: %D.type.102: type = fn_type @D, @Inner(%T, %U) [symbolic]
  506. // CHECK:STDOUT: %D.d85: %D.type.102 = struct_value () [symbolic]
  507. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  508. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  509. // CHECK:STDOUT: %require_complete.127: <witness> = require_complete_type %Outer.9d6 [symbolic]
  510. // CHECK:STDOUT: %Outer.val.234: %Outer.9d6 = struct_value () [symbolic]
  511. // CHECK:STDOUT: %Inner.type.a71: type = generic_class_type @Inner, @Outer(%U) [symbolic]
  512. // CHECK:STDOUT: %Inner.generic.e3b: %Inner.type.a71 = struct_value () [symbolic]
  513. // CHECK:STDOUT: %require_complete.964: <witness> = require_complete_type %Outer.99f [symbolic]
  514. // CHECK:STDOUT: %Outer.val.a2f: %Outer.99f = struct_value () [symbolic]
  515. // CHECK:STDOUT: %A.type.5c8: type = fn_type @A, @Inner(%T, %T) [symbolic]
  516. // CHECK:STDOUT: %A.7e2: %A.type.5c8 = struct_value () [symbolic]
  517. // CHECK:STDOUT: %B.type.ec0: type = fn_type @B, @Inner(%T, %T) [symbolic]
  518. // CHECK:STDOUT: %B.051: %B.type.ec0 = struct_value () [symbolic]
  519. // CHECK:STDOUT: %C.type.1cf: type = fn_type @C, @Inner(%T, %T) [symbolic]
  520. // CHECK:STDOUT: %C.cf5: %C.type.1cf = struct_value () [symbolic]
  521. // CHECK:STDOUT: %D.type.7bc: type = fn_type @D, @Inner(%T, %T) [symbolic]
  522. // CHECK:STDOUT: %D.aa3: %D.type.7bc = struct_value () [symbolic]
  523. // CHECK:STDOUT: %require_complete.7b1: <witness> = require_complete_type %Inner.13a [symbolic]
  524. // CHECK:STDOUT: %Inner.val.69d: %Inner.13a = struct_value () [symbolic]
  525. // CHECK:STDOUT: %require_complete.e7e: <witness> = require_complete_type %Inner.c71 [symbolic]
  526. // CHECK:STDOUT: %Inner.val.dfa: %Inner.c71 = struct_value () [symbolic]
  527. // CHECK:STDOUT: }
  528. // CHECK:STDOUT:
  529. // CHECK:STDOUT: imports {
  530. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  531. // CHECK:STDOUT: import Core//prelude
  532. // CHECK:STDOUT: import Core//prelude/...
  533. // CHECK:STDOUT: }
  534. // CHECK:STDOUT: }
  535. // CHECK:STDOUT:
  536. // CHECK:STDOUT: file {
  537. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  538. // CHECK:STDOUT: .Core = imports.%Core
  539. // CHECK:STDOUT: .Outer = %Outer.decl
  540. // CHECK:STDOUT: }
  541. // CHECK:STDOUT: %Core.import = import Core
  542. // CHECK:STDOUT: %Outer.decl: %Outer.type = class_decl @Outer [concrete = constants.%Outer.generic] {
  543. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  544. // CHECK:STDOUT: } {
  545. // CHECK:STDOUT: %T.loc2_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc2_13.2 (constants.%T)]
  546. // CHECK:STDOUT: }
  547. // CHECK:STDOUT: }
  548. // CHECK:STDOUT:
  549. // CHECK:STDOUT: generic class @Outer(%T.loc2_13.1: type) {
  550. // CHECK:STDOUT: %T.loc2_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc2_13.2 (constants.%T)]
  551. // CHECK:STDOUT:
  552. // CHECK:STDOUT: !definition:
  553. // CHECK:STDOUT: %Inner.type: type = generic_class_type @Inner, @Outer(%T.loc2_13.2) [symbolic = %Inner.type (constants.%Inner.type.eae)]
  554. // CHECK:STDOUT: %Inner.generic: @Outer.%Inner.type (%Inner.type.eae) = struct_value () [symbolic = %Inner.generic (constants.%Inner.generic.137)]
  555. // CHECK:STDOUT:
  556. // CHECK:STDOUT: class {
  557. // CHECK:STDOUT: %Inner.decl: @Outer.%Inner.type (%Inner.type.eae) = class_decl @Inner [symbolic = @Outer.%Inner.generic (constants.%Inner.generic.137)] {
  558. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 1 [concrete]
  559. // CHECK:STDOUT: } {
  560. // CHECK:STDOUT: %U.loc3_15.1: type = bind_symbolic_name U, 1 [symbolic = %U.loc3_15.2 (constants.%U)]
  561. // CHECK:STDOUT: }
  562. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  563. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
  564. // CHECK:STDOUT: complete_type_witness = %complete_type
  565. // CHECK:STDOUT:
  566. // CHECK:STDOUT: !members:
  567. // CHECK:STDOUT: .Self = constants.%Outer.9d6
  568. // CHECK:STDOUT: .Inner = %Inner.decl
  569. // CHECK:STDOUT: .Outer = <poisoned>
  570. // CHECK:STDOUT: .T = <poisoned>
  571. // CHECK:STDOUT: }
  572. // CHECK:STDOUT: }
  573. // CHECK:STDOUT:
  574. // CHECK:STDOUT: generic class @Inner(@Outer.%T.loc2_13.1: type, %U.loc3_15.1: type) {
  575. // CHECK:STDOUT: %U.loc3_15.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc3_15.2 (constants.%U)]
  576. // CHECK:STDOUT:
  577. // CHECK:STDOUT: !definition:
  578. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  579. // CHECK:STDOUT: %A.type: type = fn_type @A, @Inner(%T, %U.loc3_15.2) [symbolic = %A.type (constants.%A.type.8d7)]
  580. // CHECK:STDOUT: %A: @Inner.%A.type (%A.type.8d7) = struct_value () [symbolic = %A (constants.%A.d0e)]
  581. // CHECK:STDOUT: %B.type: type = fn_type @B, @Inner(%T, %U.loc3_15.2) [symbolic = %B.type (constants.%B.type.880)]
  582. // CHECK:STDOUT: %B: @Inner.%B.type (%B.type.880) = struct_value () [symbolic = %B (constants.%B.c7b)]
  583. // CHECK:STDOUT: %C.type: type = fn_type @C, @Inner(%T, %U.loc3_15.2) [symbolic = %C.type (constants.%C.type.714)]
  584. // CHECK:STDOUT: %C: @Inner.%C.type (%C.type.714) = struct_value () [symbolic = %C (constants.%C.e62)]
  585. // CHECK:STDOUT: %D.type: type = fn_type @D, @Inner(%T, %U.loc3_15.2) [symbolic = %D.type (constants.%D.type.102)]
  586. // CHECK:STDOUT: %D: @Inner.%D.type (%D.type.102) = struct_value () [symbolic = %D (constants.%D.d85)]
  587. // CHECK:STDOUT:
  588. // CHECK:STDOUT: class {
  589. // CHECK:STDOUT: %A.decl: @Inner.%A.type (%A.type.8d7) = fn_decl @A [symbolic = @Inner.%A (constants.%A.d0e)] {
  590. // CHECK:STDOUT: %return.patt: @A.%pattern_type (%pattern_type.e86) = return_slot_pattern [concrete]
  591. // CHECK:STDOUT: %return.param_patt: @A.%pattern_type (%pattern_type.e86) = out_param_pattern %return.patt, call_param0 [concrete]
  592. // CHECK:STDOUT: } {
  593. // CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [concrete = constants.%Outer.generic]
  594. // CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc2_13.1 [symbolic = %T (constants.%T)]
  595. // CHECK:STDOUT: %Outer.loc4_22.2: type = class_type @Outer, @Outer(constants.%T) [symbolic = %Outer.loc4_22.1 (constants.%Outer.9d6)]
  596. // CHECK:STDOUT: %return.param: ref @A.%Outer.loc4_22.1 (%Outer.9d6) = out_param call_param0
  597. // CHECK:STDOUT: %return: ref @A.%Outer.loc4_22.1 (%Outer.9d6) = return_slot %return.param
  598. // CHECK:STDOUT: }
  599. // CHECK:STDOUT: %B.decl: @Inner.%B.type (%B.type.880) = fn_decl @B [symbolic = @Inner.%B (constants.%B.c7b)] {
  600. // CHECK:STDOUT: %return.patt: @B.%pattern_type (%pattern_type.089) = return_slot_pattern [concrete]
  601. // CHECK:STDOUT: %return.param_patt: @B.%pattern_type (%pattern_type.089) = out_param_pattern %return.patt, call_param0 [concrete]
  602. // CHECK:STDOUT: } {
  603. // CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [concrete = constants.%Outer.generic]
  604. // CHECK:STDOUT: %U.ref: type = name_ref U, @Inner.%U.loc3_15.1 [symbolic = %U (constants.%U)]
  605. // CHECK:STDOUT: %Outer.loc7_22.2: type = class_type @Outer, @Outer(constants.%U) [symbolic = %Outer.loc7_22.1 (constants.%Outer.99f)]
  606. // CHECK:STDOUT: %return.param: ref @B.%Outer.loc7_22.1 (%Outer.99f) = out_param call_param0
  607. // CHECK:STDOUT: %return: ref @B.%Outer.loc7_22.1 (%Outer.99f) = return_slot %return.param
  608. // CHECK:STDOUT: }
  609. // CHECK:STDOUT: %C.decl: @Inner.%C.type (%C.type.714) = fn_decl @C [symbolic = @Inner.%C (constants.%C.e62)] {
  610. // CHECK:STDOUT: %return.patt: @C.%pattern_type (%pattern_type.a60) = return_slot_pattern [concrete]
  611. // CHECK:STDOUT: %return.param_patt: @C.%pattern_type (%pattern_type.a60) = out_param_pattern %return.patt, call_param0 [concrete]
  612. // CHECK:STDOUT: } {
  613. // CHECK:STDOUT: %.loc10: @C.%Inner.type (%Inner.type.eae) = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.generic (constants.%Inner.generic.137)]
  614. // CHECK:STDOUT: %Inner.ref: @C.%Inner.type (%Inner.type.eae) = name_ref Inner, %.loc10 [symbolic = %Inner.generic (constants.%Inner.generic.137)]
  615. // CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc2_13.1 [symbolic = %T (constants.%T)]
  616. // CHECK:STDOUT: %Inner.loc10_22.2: type = class_type @Inner, @Inner(constants.%T, constants.%T) [symbolic = %Inner.loc10_22.1 (constants.%Inner.13a)]
  617. // CHECK:STDOUT: %return.param: ref @C.%Inner.loc10_22.1 (%Inner.13a) = out_param call_param0
  618. // CHECK:STDOUT: %return: ref @C.%Inner.loc10_22.1 (%Inner.13a) = return_slot %return.param
  619. // CHECK:STDOUT: }
  620. // CHECK:STDOUT: %D.decl: @Inner.%D.type (%D.type.102) = fn_decl @D [symbolic = @Inner.%D (constants.%D.d85)] {
  621. // CHECK:STDOUT: %return.patt: @D.%pattern_type (%pattern_type.372) = return_slot_pattern [concrete]
  622. // CHECK:STDOUT: %return.param_patt: @D.%pattern_type (%pattern_type.372) = out_param_pattern %return.patt, call_param0 [concrete]
  623. // CHECK:STDOUT: } {
  624. // CHECK:STDOUT: %.loc13: @D.%Inner.type (%Inner.type.eae) = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.generic (constants.%Inner.generic.137)]
  625. // CHECK:STDOUT: %Inner.ref: @D.%Inner.type (%Inner.type.eae) = name_ref Inner, %.loc13 [symbolic = %Inner.generic (constants.%Inner.generic.137)]
  626. // CHECK:STDOUT: %U.ref: type = name_ref U, @Inner.%U.loc3_15.1 [symbolic = %U (constants.%U)]
  627. // CHECK:STDOUT: %Inner.loc13_22.2: type = class_type @Inner, @Inner(constants.%T, constants.%U) [symbolic = %Inner.loc13_22.1 (constants.%Inner.c71)]
  628. // CHECK:STDOUT: %return.param: ref @D.%Inner.loc13_22.1 (%Inner.c71) = out_param call_param0
  629. // CHECK:STDOUT: %return: ref @D.%Inner.loc13_22.1 (%Inner.c71) = return_slot %return.param
  630. // CHECK:STDOUT: }
  631. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  632. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
  633. // CHECK:STDOUT: complete_type_witness = %complete_type
  634. // CHECK:STDOUT:
  635. // CHECK:STDOUT: !members:
  636. // CHECK:STDOUT: .Self = constants.%Inner.c71
  637. // CHECK:STDOUT: .Outer = <poisoned>
  638. // CHECK:STDOUT: .T = <poisoned>
  639. // CHECK:STDOUT: .A = %A.decl
  640. // CHECK:STDOUT: .U = <poisoned>
  641. // CHECK:STDOUT: .B = %B.decl
  642. // CHECK:STDOUT: .Inner = <poisoned>
  643. // CHECK:STDOUT: .C = %C.decl
  644. // CHECK:STDOUT: .D = %D.decl
  645. // CHECK:STDOUT: }
  646. // CHECK:STDOUT: }
  647. // CHECK:STDOUT:
  648. // CHECK:STDOUT: generic fn @A(@Outer.%T.loc2_13.1: type, @Inner.%U.loc3_15.1: type) {
  649. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  650. // CHECK:STDOUT: %Outer.loc4_22.1: type = class_type @Outer, @Outer(%T) [symbolic = %Outer.loc4_22.1 (constants.%Outer.9d6)]
  651. // CHECK:STDOUT: %pattern_type: type = pattern_type %Outer.loc4_22.1 [symbolic = %pattern_type (constants.%pattern_type.e86)]
  652. // CHECK:STDOUT:
  653. // CHECK:STDOUT: !definition:
  654. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Outer.loc4_22.1 [symbolic = %require_complete (constants.%require_complete.127)]
  655. // CHECK:STDOUT: %Outer.val: @A.%Outer.loc4_22.1 (%Outer.9d6) = struct_value () [symbolic = %Outer.val (constants.%Outer.val.234)]
  656. // CHECK:STDOUT:
  657. // CHECK:STDOUT: fn() -> %return.param: @A.%Outer.loc4_22.1 (%Outer.9d6) {
  658. // CHECK:STDOUT: !entry:
  659. // CHECK:STDOUT: %.loc5_15.1: %empty_struct_type = struct_literal ()
  660. // CHECK:STDOUT: %.loc5_15.2: init @A.%Outer.loc4_22.1 (%Outer.9d6) = class_init (), %return [symbolic = %Outer.val (constants.%Outer.val.234)]
  661. // CHECK:STDOUT: %.loc5_16: init @A.%Outer.loc4_22.1 (%Outer.9d6) = converted %.loc5_15.1, %.loc5_15.2 [symbolic = %Outer.val (constants.%Outer.val.234)]
  662. // CHECK:STDOUT: return %.loc5_16 to %return
  663. // CHECK:STDOUT: }
  664. // CHECK:STDOUT: }
  665. // CHECK:STDOUT:
  666. // CHECK:STDOUT: generic fn @B(@Outer.%T.loc2_13.1: type, @Inner.%U.loc3_15.1: type) {
  667. // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic = %U (constants.%U)]
  668. // CHECK:STDOUT: %Outer.loc7_22.1: type = class_type @Outer, @Outer(%U) [symbolic = %Outer.loc7_22.1 (constants.%Outer.99f)]
  669. // CHECK:STDOUT: %pattern_type: type = pattern_type %Outer.loc7_22.1 [symbolic = %pattern_type (constants.%pattern_type.089)]
  670. // CHECK:STDOUT:
  671. // CHECK:STDOUT: !definition:
  672. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Outer.loc7_22.1 [symbolic = %require_complete (constants.%require_complete.964)]
  673. // CHECK:STDOUT: %Outer.val: @B.%Outer.loc7_22.1 (%Outer.99f) = struct_value () [symbolic = %Outer.val (constants.%Outer.val.a2f)]
  674. // CHECK:STDOUT:
  675. // CHECK:STDOUT: fn() -> %return.param: @B.%Outer.loc7_22.1 (%Outer.99f) {
  676. // CHECK:STDOUT: !entry:
  677. // CHECK:STDOUT: %.loc8_15.1: %empty_struct_type = struct_literal ()
  678. // CHECK:STDOUT: %.loc8_15.2: init @B.%Outer.loc7_22.1 (%Outer.99f) = class_init (), %return [symbolic = %Outer.val (constants.%Outer.val.a2f)]
  679. // CHECK:STDOUT: %.loc8_16: init @B.%Outer.loc7_22.1 (%Outer.99f) = converted %.loc8_15.1, %.loc8_15.2 [symbolic = %Outer.val (constants.%Outer.val.a2f)]
  680. // CHECK:STDOUT: return %.loc8_16 to %return
  681. // CHECK:STDOUT: }
  682. // CHECK:STDOUT: }
  683. // CHECK:STDOUT:
  684. // CHECK:STDOUT: generic fn @C(@Outer.%T.loc2_13.1: type, @Inner.%U.loc3_15.1: type) {
  685. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  686. // CHECK:STDOUT: %Inner.type: type = generic_class_type @Inner, @Outer(%T) [symbolic = %Inner.type (constants.%Inner.type.eae)]
  687. // CHECK:STDOUT: %Inner.generic: @C.%Inner.type (%Inner.type.eae) = struct_value () [symbolic = %Inner.generic (constants.%Inner.generic.137)]
  688. // CHECK:STDOUT: %Inner.loc10_22.1: type = class_type @Inner, @Inner(%T, %T) [symbolic = %Inner.loc10_22.1 (constants.%Inner.13a)]
  689. // CHECK:STDOUT: %pattern_type: type = pattern_type %Inner.loc10_22.1 [symbolic = %pattern_type (constants.%pattern_type.a60)]
  690. // CHECK:STDOUT:
  691. // CHECK:STDOUT: !definition:
  692. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Inner.loc10_22.1 [symbolic = %require_complete (constants.%require_complete.7b1)]
  693. // CHECK:STDOUT: %Inner.val: @C.%Inner.loc10_22.1 (%Inner.13a) = struct_value () [symbolic = %Inner.val (constants.%Inner.val.69d)]
  694. // CHECK:STDOUT:
  695. // CHECK:STDOUT: fn() -> %return.param: @C.%Inner.loc10_22.1 (%Inner.13a) {
  696. // CHECK:STDOUT: !entry:
  697. // CHECK:STDOUT: %.loc11_15.1: %empty_struct_type = struct_literal ()
  698. // CHECK:STDOUT: %.loc11_15.2: init @C.%Inner.loc10_22.1 (%Inner.13a) = class_init (), %return [symbolic = %Inner.val (constants.%Inner.val.69d)]
  699. // CHECK:STDOUT: %.loc11_16: init @C.%Inner.loc10_22.1 (%Inner.13a) = converted %.loc11_15.1, %.loc11_15.2 [symbolic = %Inner.val (constants.%Inner.val.69d)]
  700. // CHECK:STDOUT: return %.loc11_16 to %return
  701. // CHECK:STDOUT: }
  702. // CHECK:STDOUT: }
  703. // CHECK:STDOUT:
  704. // CHECK:STDOUT: generic fn @D(@Outer.%T.loc2_13.1: type, @Inner.%U.loc3_15.1: type) {
  705. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  706. // CHECK:STDOUT: %Inner.type: type = generic_class_type @Inner, @Outer(%T) [symbolic = %Inner.type (constants.%Inner.type.eae)]
  707. // CHECK:STDOUT: %Inner.generic: @D.%Inner.type (%Inner.type.eae) = struct_value () [symbolic = %Inner.generic (constants.%Inner.generic.137)]
  708. // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic = %U (constants.%U)]
  709. // CHECK:STDOUT: %Inner.loc13_22.1: type = class_type @Inner, @Inner(%T, %U) [symbolic = %Inner.loc13_22.1 (constants.%Inner.c71)]
  710. // CHECK:STDOUT: %pattern_type: type = pattern_type %Inner.loc13_22.1 [symbolic = %pattern_type (constants.%pattern_type.372)]
  711. // CHECK:STDOUT:
  712. // CHECK:STDOUT: !definition:
  713. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Inner.loc13_22.1 [symbolic = %require_complete (constants.%require_complete.e7e)]
  714. // CHECK:STDOUT: %Inner.val: @D.%Inner.loc13_22.1 (%Inner.c71) = struct_value () [symbolic = %Inner.val (constants.%Inner.val.dfa)]
  715. // CHECK:STDOUT:
  716. // CHECK:STDOUT: fn() -> %return.param: @D.%Inner.loc13_22.1 (%Inner.c71) {
  717. // CHECK:STDOUT: !entry:
  718. // CHECK:STDOUT: %.loc14_15.1: %empty_struct_type = struct_literal ()
  719. // CHECK:STDOUT: %.loc14_15.2: init @D.%Inner.loc13_22.1 (%Inner.c71) = class_init (), %return [symbolic = %Inner.val (constants.%Inner.val.dfa)]
  720. // CHECK:STDOUT: %.loc14_16: init @D.%Inner.loc13_22.1 (%Inner.c71) = converted %.loc14_15.1, %.loc14_15.2 [symbolic = %Inner.val (constants.%Inner.val.dfa)]
  721. // CHECK:STDOUT: return %.loc14_16 to %return
  722. // CHECK:STDOUT: }
  723. // CHECK:STDOUT: }
  724. // CHECK:STDOUT:
  725. // CHECK:STDOUT: specific @Outer(constants.%T) {
  726. // CHECK:STDOUT: %T.loc2_13.2 => constants.%T
  727. // CHECK:STDOUT:
  728. // CHECK:STDOUT: !definition:
  729. // CHECK:STDOUT: %Inner.type => constants.%Inner.type.eae
  730. // CHECK:STDOUT: %Inner.generic => constants.%Inner.generic.137
  731. // CHECK:STDOUT: }
  732. // CHECK:STDOUT:
  733. // CHECK:STDOUT: specific @Inner(constants.%T, constants.%U) {
  734. // CHECK:STDOUT: %U.loc3_15.2 => constants.%U
  735. // CHECK:STDOUT:
  736. // CHECK:STDOUT: !definition:
  737. // CHECK:STDOUT: %T => constants.%T
  738. // CHECK:STDOUT: %A.type => constants.%A.type.8d7
  739. // CHECK:STDOUT: %A => constants.%A.d0e
  740. // CHECK:STDOUT: %B.type => constants.%B.type.880
  741. // CHECK:STDOUT: %B => constants.%B.c7b
  742. // CHECK:STDOUT: %C.type => constants.%C.type.714
  743. // CHECK:STDOUT: %C => constants.%C.e62
  744. // CHECK:STDOUT: %D.type => constants.%D.type.102
  745. // CHECK:STDOUT: %D => constants.%D.d85
  746. // CHECK:STDOUT: }
  747. // CHECK:STDOUT:
  748. // CHECK:STDOUT: specific @A(constants.%T, constants.%U) {
  749. // CHECK:STDOUT: %T => constants.%T
  750. // CHECK:STDOUT: %Outer.loc4_22.1 => constants.%Outer.9d6
  751. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e86
  752. // CHECK:STDOUT: }
  753. // CHECK:STDOUT:
  754. // CHECK:STDOUT: specific @Outer(constants.%U) {
  755. // CHECK:STDOUT: %T.loc2_13.2 => constants.%U
  756. // CHECK:STDOUT:
  757. // CHECK:STDOUT: !definition:
  758. // CHECK:STDOUT: %Inner.type => constants.%Inner.type.a71
  759. // CHECK:STDOUT: %Inner.generic => constants.%Inner.generic.e3b
  760. // CHECK:STDOUT: }
  761. // CHECK:STDOUT:
  762. // CHECK:STDOUT: specific @B(constants.%T, constants.%U) {
  763. // CHECK:STDOUT: %U => constants.%U
  764. // CHECK:STDOUT: %Outer.loc7_22.1 => constants.%Outer.99f
  765. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.089
  766. // CHECK:STDOUT: }
  767. // CHECK:STDOUT:
  768. // CHECK:STDOUT: specific @Inner(constants.%T, constants.%T) {
  769. // CHECK:STDOUT: %U.loc3_15.2 => constants.%T
  770. // CHECK:STDOUT:
  771. // CHECK:STDOUT: !definition:
  772. // CHECK:STDOUT: %T => constants.%T
  773. // CHECK:STDOUT: %A.type => constants.%A.type.5c8
  774. // CHECK:STDOUT: %A => constants.%A.7e2
  775. // CHECK:STDOUT: %B.type => constants.%B.type.ec0
  776. // CHECK:STDOUT: %B => constants.%B.051
  777. // CHECK:STDOUT: %C.type => constants.%C.type.1cf
  778. // CHECK:STDOUT: %C => constants.%C.cf5
  779. // CHECK:STDOUT: %D.type => constants.%D.type.7bc
  780. // CHECK:STDOUT: %D => constants.%D.aa3
  781. // CHECK:STDOUT: }
  782. // CHECK:STDOUT:
  783. // CHECK:STDOUT: specific @C(constants.%T, constants.%U) {
  784. // CHECK:STDOUT: %T => constants.%T
  785. // CHECK:STDOUT: %Inner.type => constants.%Inner.type.eae
  786. // CHECK:STDOUT: %Inner.generic => constants.%Inner.generic.137
  787. // CHECK:STDOUT: %Inner.loc10_22.1 => constants.%Inner.13a
  788. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a60
  789. // CHECK:STDOUT: }
  790. // CHECK:STDOUT:
  791. // CHECK:STDOUT: specific @D(constants.%T, constants.%U) {
  792. // CHECK:STDOUT: %T => constants.%T
  793. // CHECK:STDOUT: %Inner.type => constants.%Inner.type.eae
  794. // CHECK:STDOUT: %Inner.generic => constants.%Inner.generic.137
  795. // CHECK:STDOUT: %U => constants.%U
  796. // CHECK:STDOUT: %Inner.loc13_22.1 => constants.%Inner.c71
  797. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.372
  798. // CHECK:STDOUT: }
  799. // CHECK:STDOUT: