field.carbon 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  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. // AUTOUPDATE
  6. // TIP: To test this file alone, run:
  7. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/class/generic/field.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/generic/field.carbon
  10. class Class(T:! type) {
  11. var x: T;
  12. }
  13. fn F(c: Class(i32)) -> i32 {
  14. return c.x;
  15. }
  16. fn G(T:! type, c: Class(T)) -> T {
  17. return c.x;
  18. }
  19. fn H(U:! type, c: Class(U)) -> U {
  20. return c.x;
  21. }
  22. // CHECK:STDOUT: --- field.carbon
  23. // CHECK:STDOUT:
  24. // CHECK:STDOUT: constants {
  25. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  26. // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
  27. // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
  28. // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template]
  29. // CHECK:STDOUT: %Class.fe1b2d.1: type = class_type @Class, @Class(%T) [symbolic]
  30. // CHECK:STDOUT: %require_complete.4aeca8.1: <witness> = require_complete_type %T [symbolic]
  31. // CHECK:STDOUT: %Class.elem.e262de.1: type = unbound_element_type %Class.fe1b2d.1, %T [symbolic]
  32. // CHECK:STDOUT: %struct_type.x.2ac3f0.1: type = struct_type {.x: %T} [symbolic]
  33. // CHECK:STDOUT: %complete_type.4339b3.1: <witness> = complete_type_witness %struct_type.x.2ac3f0.1 [symbolic]
  34. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
  35. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
  36. // CHECK:STDOUT: %Class.247: type = class_type @Class, @Class(%i32) [template]
  37. // CHECK:STDOUT: %F.type: type = fn_type @F [template]
  38. // CHECK:STDOUT: %F: %F.type = struct_value () [template]
  39. // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template]
  40. // CHECK:STDOUT: %complete_type.f8a: <witness> = complete_type_witness %i32.builtin [template]
  41. // CHECK:STDOUT: %Class.elem.2d8: type = unbound_element_type %Class.247, %i32 [template]
  42. // CHECK:STDOUT: %struct_type.x.ed6: type = struct_type {.x: %i32} [template]
  43. // CHECK:STDOUT: %complete_type.1ec: <witness> = complete_type_witness %struct_type.x.ed6 [template]
  44. // CHECK:STDOUT: %G.type: type = fn_type @G [template]
  45. // CHECK:STDOUT: %G: %G.type = struct_value () [template]
  46. // CHECK:STDOUT: %require_complete.4f8a42.1: <witness> = require_complete_type %Class.fe1b2d.1 [symbolic]
  47. // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic]
  48. // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic]
  49. // CHECK:STDOUT: %Class.fe1b2d.2: type = class_type @Class, @Class(%U) [symbolic]
  50. // CHECK:STDOUT: %H.type: type = fn_type @H [template]
  51. // CHECK:STDOUT: %H: %H.type = struct_value () [template]
  52. // CHECK:STDOUT: %require_complete.4aeca8.2: <witness> = require_complete_type %U [symbolic]
  53. // CHECK:STDOUT: %Class.elem.e262de.2: type = unbound_element_type %Class.fe1b2d.2, %U [symbolic]
  54. // CHECK:STDOUT: %struct_type.x.2ac3f0.2: type = struct_type {.x: %U} [symbolic]
  55. // CHECK:STDOUT: %complete_type.4339b3.2: <witness> = complete_type_witness %struct_type.x.2ac3f0.2 [symbolic]
  56. // CHECK:STDOUT: %require_complete.4f8a42.2: <witness> = require_complete_type %Class.fe1b2d.2 [symbolic]
  57. // CHECK:STDOUT: }
  58. // CHECK:STDOUT:
  59. // CHECK:STDOUT: imports {
  60. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
  61. // CHECK:STDOUT: .Int = %Core.Int
  62. // CHECK:STDOUT: import Core//prelude
  63. // CHECK:STDOUT: import Core//prelude/...
  64. // CHECK:STDOUT: }
  65. // CHECK:STDOUT: }
  66. // CHECK:STDOUT:
  67. // CHECK:STDOUT: file {
  68. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  69. // CHECK:STDOUT: .Core = imports.%Core
  70. // CHECK:STDOUT: .Class = %Class.decl
  71. // CHECK:STDOUT: .F = %F.decl
  72. // CHECK:STDOUT: .G = %G.decl
  73. // CHECK:STDOUT: .H = %H.decl
  74. // CHECK:STDOUT: }
  75. // CHECK:STDOUT: %Core.import = import Core
  76. // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] {
  77. // CHECK:STDOUT: %T.patt.loc11_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_13.2 (constants.%T.patt)]
  78. // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc11_13.1, runtime_param<none> [symbolic = %T.patt.loc11_13.2 (constants.%T.patt)]
  79. // CHECK:STDOUT: } {
  80. // CHECK:STDOUT: %T.param: type = value_param runtime_param<none>
  81. // CHECK:STDOUT: %T.loc11_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc11_13.2 (constants.%T)]
  82. // CHECK:STDOUT: }
  83. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
  84. // CHECK:STDOUT: %c.patt: %Class.247 = binding_pattern c
  85. // CHECK:STDOUT: %c.param_patt: %Class.247 = value_param_pattern %c.patt, runtime_param0
  86. // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
  87. // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1
  88. // CHECK:STDOUT: } {
  89. // CHECK:STDOUT: %int_32.loc15_24: Core.IntLiteral = int_value 32 [template = constants.%int_32]
  90. // CHECK:STDOUT: %i32.loc15_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
  91. // CHECK:STDOUT: %c.param: %Class.247 = value_param runtime_param0
  92. // CHECK:STDOUT: %.loc15: type = splice_block %Class [template = constants.%Class.247] {
  93. // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic]
  94. // CHECK:STDOUT: %int_32.loc15_15: Core.IntLiteral = int_value 32 [template = constants.%int_32]
  95. // CHECK:STDOUT: %i32.loc15_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
  96. // CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.247]
  97. // CHECK:STDOUT: }
  98. // CHECK:STDOUT: %c: %Class.247 = bind_name c, %c.param
  99. // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1
  100. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  101. // CHECK:STDOUT: }
  102. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
  103. // CHECK:STDOUT: %T.patt.loc19_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_6.2 (constants.%T.patt)]
  104. // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc19_6.1, runtime_param<none> [symbolic = %T.patt.loc19_6.2 (constants.%T.patt)]
  105. // CHECK:STDOUT: %c.patt: @G.%Class.loc19_26.2 (%Class.fe1b2d.1) = binding_pattern c
  106. // CHECK:STDOUT: %c.param_patt: @G.%Class.loc19_26.2 (%Class.fe1b2d.1) = value_param_pattern %c.patt, runtime_param0
  107. // CHECK:STDOUT: %return.patt: @G.%T.loc19_6.2 (%T) = return_slot_pattern
  108. // CHECK:STDOUT: %return.param_patt: @G.%T.loc19_6.2 (%T) = out_param_pattern %return.patt, runtime_param1
  109. // CHECK:STDOUT: } {
  110. // CHECK:STDOUT: %T.ref.loc19_32: type = name_ref T, %T.loc19_6.1 [symbolic = %T.loc19_6.2 (constants.%T)]
  111. // CHECK:STDOUT: %T.param: type = value_param runtime_param<none>
  112. // CHECK:STDOUT: %T.loc19_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc19_6.2 (constants.%T)]
  113. // CHECK:STDOUT: %c.param: @G.%Class.loc19_26.2 (%Class.fe1b2d.1) = value_param runtime_param0
  114. // CHECK:STDOUT: %.loc19: type = splice_block %Class.loc19_26.1 [symbolic = %Class.loc19_26.2 (constants.%Class.fe1b2d.1)] {
  115. // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic]
  116. // CHECK:STDOUT: %T.ref.loc19_25: type = name_ref T, %T.loc19_6.1 [symbolic = %T.loc19_6.2 (constants.%T)]
  117. // CHECK:STDOUT: %Class.loc19_26.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc19_26.2 (constants.%Class.fe1b2d.1)]
  118. // CHECK:STDOUT: }
  119. // CHECK:STDOUT: %c: @G.%Class.loc19_26.2 (%Class.fe1b2d.1) = bind_name c, %c.param
  120. // CHECK:STDOUT: %return.param: ref @G.%T.loc19_6.2 (%T) = out_param runtime_param1
  121. // CHECK:STDOUT: %return: ref @G.%T.loc19_6.2 (%T) = return_slot %return.param
  122. // CHECK:STDOUT: }
  123. // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] {
  124. // CHECK:STDOUT: %U.patt.loc23_6.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc23_6.2 (constants.%U.patt)]
  125. // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc23_6.1, runtime_param<none> [symbolic = %U.patt.loc23_6.2 (constants.%U.patt)]
  126. // CHECK:STDOUT: %c.patt: @H.%Class.loc23_26.2 (%Class.fe1b2d.2) = binding_pattern c
  127. // CHECK:STDOUT: %c.param_patt: @H.%Class.loc23_26.2 (%Class.fe1b2d.2) = value_param_pattern %c.patt, runtime_param0
  128. // CHECK:STDOUT: %return.patt: @H.%U.loc23_6.2 (%U) = return_slot_pattern
  129. // CHECK:STDOUT: %return.param_patt: @H.%U.loc23_6.2 (%U) = out_param_pattern %return.patt, runtime_param1
  130. // CHECK:STDOUT: } {
  131. // CHECK:STDOUT: %U.ref.loc23_32: type = name_ref U, %U.loc23_6.1 [symbolic = %U.loc23_6.2 (constants.%U)]
  132. // CHECK:STDOUT: %U.param: type = value_param runtime_param<none>
  133. // CHECK:STDOUT: %U.loc23_6.1: type = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc23_6.2 (constants.%U)]
  134. // CHECK:STDOUT: %c.param: @H.%Class.loc23_26.2 (%Class.fe1b2d.2) = value_param runtime_param0
  135. // CHECK:STDOUT: %.loc23: type = splice_block %Class.loc23_26.1 [symbolic = %Class.loc23_26.2 (constants.%Class.fe1b2d.2)] {
  136. // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic]
  137. // CHECK:STDOUT: %U.ref.loc23_25: type = name_ref U, %U.loc23_6.1 [symbolic = %U.loc23_6.2 (constants.%U)]
  138. // CHECK:STDOUT: %Class.loc23_26.1: type = class_type @Class, @Class(constants.%U) [symbolic = %Class.loc23_26.2 (constants.%Class.fe1b2d.2)]
  139. // CHECK:STDOUT: }
  140. // CHECK:STDOUT: %c: @H.%Class.loc23_26.2 (%Class.fe1b2d.2) = bind_name c, %c.param
  141. // CHECK:STDOUT: %return.param: ref @H.%U.loc23_6.2 (%U) = out_param runtime_param1
  142. // CHECK:STDOUT: %return: ref @H.%U.loc23_6.2 (%U) = return_slot %return.param
  143. // CHECK:STDOUT: }
  144. // CHECK:STDOUT: }
  145. // CHECK:STDOUT:
  146. // CHECK:STDOUT: generic class @Class(%T.loc11_13.1: type) {
  147. // CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_13.2 (constants.%T)]
  148. // CHECK:STDOUT: %T.patt.loc11_13.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_13.2 (constants.%T.patt)]
  149. // CHECK:STDOUT:
  150. // CHECK:STDOUT: !definition:
  151. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type @Class.%T.loc11_13.2 (%T) [symbolic = %require_complete (constants.%require_complete.4aeca8.1)]
  152. // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc11_13.2) [symbolic = %Class (constants.%Class.fe1b2d.1)]
  153. // CHECK:STDOUT: %Class.elem: type = unbound_element_type @Class.%Class (%Class.fe1b2d.1), @Class.%T.loc11_13.2 (%T) [symbolic = %Class.elem (constants.%Class.elem.e262de.1)]
  154. // CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @Class.%T.loc11_13.2 (%T)} [symbolic = %struct_type.x (constants.%struct_type.x.2ac3f0.1)]
  155. // CHECK:STDOUT: %complete_type.loc13_1.2: <witness> = complete_type_witness @Class.%struct_type.x (%struct_type.x.2ac3f0.1) [symbolic = %complete_type.loc13_1.2 (constants.%complete_type.4339b3.1)]
  156. // CHECK:STDOUT:
  157. // CHECK:STDOUT: class {
  158. // CHECK:STDOUT: %.loc12_8: @Class.%Class.elem (%Class.elem.e262de.1) = field_decl x, element0 [template]
  159. // CHECK:STDOUT: name_binding_decl {
  160. // CHECK:STDOUT: %.loc12_3: @Class.%Class.elem (%Class.elem.e262de.1) = var_pattern %.loc12_8
  161. // CHECK:STDOUT: }
  162. // CHECK:STDOUT: %.var: ref @Class.%Class.elem (%Class.elem.e262de.1) = var <none>
  163. // CHECK:STDOUT: %complete_type.loc13_1.1: <witness> = complete_type_witness %struct_type.x.2ac3f0.1 [symbolic = %complete_type.loc13_1.2 (constants.%complete_type.4339b3.1)]
  164. // CHECK:STDOUT: complete_type_witness = %complete_type.loc13_1.1
  165. // CHECK:STDOUT:
  166. // CHECK:STDOUT: !members:
  167. // CHECK:STDOUT: .Self = constants.%Class.fe1b2d.1
  168. // CHECK:STDOUT: .x = %.loc12_8
  169. // CHECK:STDOUT: }
  170. // CHECK:STDOUT: }
  171. // CHECK:STDOUT:
  172. // CHECK:STDOUT: fn @F(%c.param_patt: %Class.247) -> %i32 {
  173. // CHECK:STDOUT: !entry:
  174. // CHECK:STDOUT: %c.ref: %Class.247 = name_ref c, %c
  175. // CHECK:STDOUT: %x.ref: %Class.elem.2d8 = name_ref x, @Class.%.loc12_8 [template = @Class.%.loc12_8]
  176. // CHECK:STDOUT: %.loc16_11.1: ref %i32 = class_element_access %c.ref, element0
  177. // CHECK:STDOUT: %.loc16_11.2: %i32 = bind_value %.loc16_11.1
  178. // CHECK:STDOUT: return %.loc16_11.2
  179. // CHECK:STDOUT: }
  180. // CHECK:STDOUT:
  181. // CHECK:STDOUT: generic fn @G(%T.loc19_6.1: type) {
  182. // CHECK:STDOUT: %T.loc19_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc19_6.2 (constants.%T)]
  183. // CHECK:STDOUT: %T.patt.loc19_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_6.2 (constants.%T.patt)]
  184. // CHECK:STDOUT: %Class.loc19_26.2: type = class_type @Class, @Class(%T.loc19_6.2) [symbolic = %Class.loc19_26.2 (constants.%Class.fe1b2d.1)]
  185. // CHECK:STDOUT:
  186. // CHECK:STDOUT: !definition:
  187. // CHECK:STDOUT: %require_complete.loc19: <witness> = require_complete_type @G.%Class.loc19_26.2 (%Class.fe1b2d.1) [symbolic = %require_complete.loc19 (constants.%require_complete.4f8a42.1)]
  188. // CHECK:STDOUT: %Class.elem: type = unbound_element_type @G.%Class.loc19_26.2 (%Class.fe1b2d.1), @G.%T.loc19_6.2 (%T) [symbolic = %Class.elem (constants.%Class.elem.e262de.1)]
  189. // CHECK:STDOUT: %require_complete.loc20: <witness> = require_complete_type @G.%T.loc19_6.2 (%T) [symbolic = %require_complete.loc20 (constants.%require_complete.4aeca8.1)]
  190. // CHECK:STDOUT:
  191. // CHECK:STDOUT: fn(%T.param_patt: type, %c.param_patt: @G.%Class.loc19_26.2 (%Class.fe1b2d.1)) -> @G.%T.loc19_6.2 (%T) {
  192. // CHECK:STDOUT: !entry:
  193. // CHECK:STDOUT: %c.ref: @G.%Class.loc19_26.2 (%Class.fe1b2d.1) = name_ref c, %c
  194. // CHECK:STDOUT: %x.ref: @G.%Class.elem (%Class.elem.e262de.1) = name_ref x, @Class.%.loc12_8 [template = @Class.%.loc12_8]
  195. // CHECK:STDOUT: %.loc20_11.1: ref @G.%T.loc19_6.2 (%T) = class_element_access %c.ref, element0
  196. // CHECK:STDOUT: %.loc20_11.2: @G.%T.loc19_6.2 (%T) = bind_value %.loc20_11.1
  197. // CHECK:STDOUT: return %.loc20_11.2
  198. // CHECK:STDOUT: }
  199. // CHECK:STDOUT: }
  200. // CHECK:STDOUT:
  201. // CHECK:STDOUT: generic fn @H(%U.loc23_6.1: type) {
  202. // CHECK:STDOUT: %U.loc23_6.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc23_6.2 (constants.%U)]
  203. // CHECK:STDOUT: %U.patt.loc23_6.2: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc23_6.2 (constants.%U.patt)]
  204. // CHECK:STDOUT: %Class.loc23_26.2: type = class_type @Class, @Class(%U.loc23_6.2) [symbolic = %Class.loc23_26.2 (constants.%Class.fe1b2d.2)]
  205. // CHECK:STDOUT:
  206. // CHECK:STDOUT: !definition:
  207. // CHECK:STDOUT: %require_complete.loc23_29: <witness> = require_complete_type @H.%U.loc23_6.2 (%U) [symbolic = %require_complete.loc23_29 (constants.%require_complete.4aeca8.2)]
  208. // CHECK:STDOUT: %require_complete.loc23_17: <witness> = require_complete_type @H.%Class.loc23_26.2 (%Class.fe1b2d.2) [symbolic = %require_complete.loc23_17 (constants.%require_complete.4f8a42.2)]
  209. // CHECK:STDOUT: %Class.elem: type = unbound_element_type @H.%Class.loc23_26.2 (%Class.fe1b2d.2), @H.%U.loc23_6.2 (%U) [symbolic = %Class.elem (constants.%Class.elem.e262de.2)]
  210. // CHECK:STDOUT:
  211. // CHECK:STDOUT: fn(%U.param_patt: type, %c.param_patt: @H.%Class.loc23_26.2 (%Class.fe1b2d.2)) -> @H.%U.loc23_6.2 (%U) {
  212. // CHECK:STDOUT: !entry:
  213. // CHECK:STDOUT: %c.ref: @H.%Class.loc23_26.2 (%Class.fe1b2d.2) = name_ref c, %c
  214. // CHECK:STDOUT: %x.ref: @H.%Class.elem (%Class.elem.e262de.2) = name_ref x, @Class.%.loc12_8 [template = @Class.%.loc12_8]
  215. // CHECK:STDOUT: %.loc24_11.1: ref @H.%U.loc23_6.2 (%U) = class_element_access %c.ref, element0
  216. // CHECK:STDOUT: %.loc24_11.2: @H.%U.loc23_6.2 (%U) = bind_value %.loc24_11.1
  217. // CHECK:STDOUT: return %.loc24_11.2
  218. // CHECK:STDOUT: }
  219. // CHECK:STDOUT: }
  220. // CHECK:STDOUT:
  221. // CHECK:STDOUT: specific @Class(constants.%T) {
  222. // CHECK:STDOUT: %T.loc11_13.2 => constants.%T
  223. // CHECK:STDOUT: %T.patt.loc11_13.2 => constants.%T
  224. // CHECK:STDOUT:
  225. // CHECK:STDOUT: !definition:
  226. // CHECK:STDOUT: %require_complete => constants.%require_complete.4aeca8.1
  227. // CHECK:STDOUT: %Class => constants.%Class.fe1b2d.1
  228. // CHECK:STDOUT: %Class.elem => constants.%Class.elem.e262de.1
  229. // CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2ac3f0.1
  230. // CHECK:STDOUT: %complete_type.loc13_1.2 => constants.%complete_type.4339b3.1
  231. // CHECK:STDOUT: }
  232. // CHECK:STDOUT:
  233. // CHECK:STDOUT: specific @Class(%T.loc11_13.2) {}
  234. // CHECK:STDOUT:
  235. // CHECK:STDOUT: specific @Class(constants.%i32) {
  236. // CHECK:STDOUT: %T.loc11_13.2 => constants.%i32
  237. // CHECK:STDOUT: %T.patt.loc11_13.2 => constants.%i32
  238. // CHECK:STDOUT:
  239. // CHECK:STDOUT: !definition:
  240. // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a
  241. // CHECK:STDOUT: %Class => constants.%Class.247
  242. // CHECK:STDOUT: %Class.elem => constants.%Class.elem.2d8
  243. // CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.ed6
  244. // CHECK:STDOUT: %complete_type.loc13_1.2 => constants.%complete_type.1ec
  245. // CHECK:STDOUT: }
  246. // CHECK:STDOUT:
  247. // CHECK:STDOUT: specific @G(constants.%T) {
  248. // CHECK:STDOUT: %T.loc19_6.2 => constants.%T
  249. // CHECK:STDOUT: %T.patt.loc19_6.2 => constants.%T
  250. // CHECK:STDOUT: %Class.loc19_26.2 => constants.%Class.fe1b2d.1
  251. // CHECK:STDOUT: }
  252. // CHECK:STDOUT:
  253. // CHECK:STDOUT: specific @Class(@G.%T.loc19_6.2) {}
  254. // CHECK:STDOUT:
  255. // CHECK:STDOUT: specific @Class(constants.%U) {
  256. // CHECK:STDOUT: %T.loc11_13.2 => constants.%U
  257. // CHECK:STDOUT: %T.patt.loc11_13.2 => constants.%U
  258. // CHECK:STDOUT:
  259. // CHECK:STDOUT: !definition:
  260. // CHECK:STDOUT: %require_complete => constants.%require_complete.4aeca8.2
  261. // CHECK:STDOUT: %Class => constants.%Class.fe1b2d.2
  262. // CHECK:STDOUT: %Class.elem => constants.%Class.elem.e262de.2
  263. // CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2ac3f0.2
  264. // CHECK:STDOUT: %complete_type.loc13_1.2 => constants.%complete_type.4339b3.2
  265. // CHECK:STDOUT: }
  266. // CHECK:STDOUT:
  267. // CHECK:STDOUT: specific @H(constants.%U) {
  268. // CHECK:STDOUT: %U.loc23_6.2 => constants.%U
  269. // CHECK:STDOUT: %U.patt.loc23_6.2 => constants.%U
  270. // CHECK:STDOUT: %Class.loc23_26.2 => constants.%Class.fe1b2d.2
  271. // CHECK:STDOUT: }
  272. // CHECK:STDOUT:
  273. // CHECK:STDOUT: specific @Class(@H.%U.loc23_6.2) {}
  274. // CHECK:STDOUT: