field.carbon 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  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.1: type = symbolic_binding_pattern T, 0 [symbolic]
  27. // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template]
  28. // CHECK:STDOUT: %.1: type = tuple_type () [template]
  29. // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template]
  30. // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic]
  31. // CHECK:STDOUT: %.2: type = unbound_element_type %Class.2, %T [symbolic]
  32. // CHECK:STDOUT: %.3: type = struct_type {.x: %T} [symbolic]
  33. // CHECK:STDOUT: %.4: <witness> = complete_type_witness %.3 [symbolic]
  34. // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
  35. // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
  36. // CHECK:STDOUT: %Class.3: 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: %.5: type = unbound_element_type %Class.3, i32 [template]
  40. // CHECK:STDOUT: %.6: type = struct_type {.x: i32} [template]
  41. // CHECK:STDOUT: %.7: <witness> = complete_type_witness %.6 [template]
  42. // CHECK:STDOUT: %.8: type = ptr_type %.6 [template]
  43. // CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic]
  44. // CHECK:STDOUT: %G.type: type = fn_type @G [template]
  45. // CHECK:STDOUT: %G: %G.type = struct_value () [template]
  46. // CHECK:STDOUT: %.9: type = ptr_type %.3 [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.4: 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: %.10: type = unbound_element_type %Class.4, %U [symbolic]
  53. // CHECK:STDOUT: %.11: type = struct_type {.x: %U} [symbolic]
  54. // CHECK:STDOUT: %.12: <witness> = complete_type_witness %.11 [symbolic]
  55. // CHECK:STDOUT: %.13: type = ptr_type %.11 [symbolic]
  56. // CHECK:STDOUT: }
  57. // CHECK:STDOUT:
  58. // CHECK:STDOUT: imports {
  59. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
  60. // CHECK:STDOUT: .Int32 = %import_ref
  61. // CHECK:STDOUT: import Core//prelude
  62. // CHECK:STDOUT: import Core//prelude/...
  63. // CHECK:STDOUT: }
  64. // CHECK:STDOUT: %import_ref: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32]
  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.1] {
  77. // CHECK:STDOUT: %T.patt.loc11_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_13.2 (constants.%T.patt.1)]
  78. // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc11_13.1, runtime_param<invalid> [symbolic = %T.patt.loc11_13.2 (constants.%T.patt.1)]
  79. // CHECK:STDOUT: } {
  80. // CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
  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.3 = binding_pattern c
  85. // CHECK:STDOUT: %c.param_patt: %Class.3 = 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: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1]
  90. // CHECK:STDOUT: %int.make_type_32.loc15_15: init type = call constants.%Int32() [template = i32]
  91. // CHECK:STDOUT: %.loc15_14.1: type = value_of_initializer %int.make_type_32.loc15_15 [template = i32]
  92. // CHECK:STDOUT: %.loc15_14.2: type = converted %int.make_type_32.loc15_15, %.loc15_14.1 [template = i32]
  93. // CHECK:STDOUT: %Class: type = class_type @Class, @Class(i32) [template = constants.%Class.3]
  94. // CHECK:STDOUT: %int.make_type_32.loc15_24: init type = call constants.%Int32() [template = i32]
  95. // CHECK:STDOUT: %.loc15_24.1: type = value_of_initializer %int.make_type_32.loc15_24 [template = i32]
  96. // CHECK:STDOUT: %.loc15_24.2: type = converted %int.make_type_32.loc15_24, %.loc15_24.1 [template = i32]
  97. // CHECK:STDOUT: %c.param: %Class.3 = value_param runtime_param0
  98. // CHECK:STDOUT: %c: %Class.3 = 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.2)]
  104. // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc19_6.1, runtime_param<invalid> [symbolic = %T.patt.loc19_6.2 (constants.%T.patt.2)]
  105. // CHECK:STDOUT: %c.patt: @G.%Class.loc19_24.2 (%Class.2) = binding_pattern c
  106. // CHECK:STDOUT: %c.param_patt: @G.%Class.loc19_24.2 (%Class.2) = 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: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1]
  111. // CHECK:STDOUT: %T.ref.loc19_25: type = name_ref T, %T.loc19_6.1 [symbolic = %T.loc19_6.2 (constants.%T)]
  112. // CHECK:STDOUT: %Class.loc19_24.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc19_24.2 (constants.%Class.2)]
  113. // CHECK:STDOUT: %T.ref.loc19_32: type = name_ref T, %T.loc19_6.1 [symbolic = %T.loc19_6.2 (constants.%T)]
  114. // CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
  115. // CHECK:STDOUT: %T.loc19_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc19_6.2 (constants.%T)]
  116. // CHECK:STDOUT: %c.param: @G.%Class.loc19_24.2 (%Class.2) = value_param runtime_param0
  117. // CHECK:STDOUT: %c: @G.%Class.loc19_24.2 (%Class.2) = bind_name c, %c.param
  118. // CHECK:STDOUT: %return.param: ref @G.%T.loc19_6.2 (%T) = out_param runtime_param1
  119. // CHECK:STDOUT: %return: ref @G.%T.loc19_6.2 (%T) = return_slot %return.param
  120. // CHECK:STDOUT: }
  121. // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] {
  122. // CHECK:STDOUT: %U.patt.loc23_6.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc23_6.2 (constants.%U.patt)]
  123. // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc23_6.1, runtime_param<invalid> [symbolic = %U.patt.loc23_6.2 (constants.%U.patt)]
  124. // CHECK:STDOUT: %c.patt: @H.%Class.loc23_24.2 (%Class.4) = binding_pattern c
  125. // CHECK:STDOUT: %c.param_patt: @H.%Class.loc23_24.2 (%Class.4) = value_param_pattern %c.patt, runtime_param0
  126. // CHECK:STDOUT: %return.patt: @H.%U.loc23_6.2 (%U) = return_slot_pattern
  127. // CHECK:STDOUT: %return.param_patt: @H.%U.loc23_6.2 (%U) = out_param_pattern %return.patt, runtime_param1
  128. // CHECK:STDOUT: } {
  129. // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1]
  130. // CHECK:STDOUT: %U.ref.loc23_25: type = name_ref U, %U.loc23_6.1 [symbolic = %U.loc23_6.2 (constants.%U)]
  131. // CHECK:STDOUT: %Class.loc23_24.1: type = class_type @Class, @Class(constants.%U) [symbolic = %Class.loc23_24.2 (constants.%Class.4)]
  132. // CHECK:STDOUT: %U.ref.loc23_32: type = name_ref U, %U.loc23_6.1 [symbolic = %U.loc23_6.2 (constants.%U)]
  133. // CHECK:STDOUT: %U.param: type = value_param runtime_param<invalid>
  134. // CHECK:STDOUT: %U.loc23_6.1: type = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc23_6.2 (constants.%U)]
  135. // CHECK:STDOUT: %c.param: @H.%Class.loc23_24.2 (%Class.4) = value_param runtime_param0
  136. // CHECK:STDOUT: %c: @H.%Class.loc23_24.2 (%Class.4) = bind_name c, %c.param
  137. // CHECK:STDOUT: %return.param: ref @H.%U.loc23_6.2 (%U) = out_param runtime_param1
  138. // CHECK:STDOUT: %return: ref @H.%U.loc23_6.2 (%U) = return_slot %return.param
  139. // CHECK:STDOUT: }
  140. // CHECK:STDOUT: }
  141. // CHECK:STDOUT:
  142. // CHECK:STDOUT: generic class @Class(%T.loc11_13.1: type) {
  143. // CHECK:STDOUT: %T.loc11_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_13.2 (constants.%T)]
  144. // CHECK:STDOUT: %T.patt.loc11_13.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_13.2 (constants.%T.patt.1)]
  145. // CHECK:STDOUT:
  146. // CHECK:STDOUT: !definition:
  147. // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc11_13.2) [symbolic = %Class (constants.%Class.2)]
  148. // CHECK:STDOUT: %.loc12_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.loc11_13.2 (%T) [symbolic = %.loc12_8.2 (constants.%.2)]
  149. // CHECK:STDOUT: %.loc13_1.2: type = struct_type {.x: @Class.%T.loc11_13.2 (%T)} [symbolic = %.loc13_1.2 (constants.%.3)]
  150. // CHECK:STDOUT: %.loc13_1.3: <witness> = complete_type_witness @Class.%.loc13_1.2 (%.3) [symbolic = %.loc13_1.3 (constants.%.4)]
  151. // CHECK:STDOUT:
  152. // CHECK:STDOUT: class {
  153. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_13.1 [symbolic = %T.loc11_13.2 (constants.%T)]
  154. // CHECK:STDOUT: %.loc12_8.1: @Class.%.loc12_8.2 (%.2) = field_decl x, element0 [template]
  155. // CHECK:STDOUT: %.loc13_1.1: <witness> = complete_type_witness %.3 [symbolic = %.loc13_1.3 (constants.%.4)]
  156. // CHECK:STDOUT:
  157. // CHECK:STDOUT: !members:
  158. // CHECK:STDOUT: .Self = constants.%Class.2
  159. // CHECK:STDOUT: .x = %.loc12_8.1
  160. // CHECK:STDOUT: }
  161. // CHECK:STDOUT: }
  162. // CHECK:STDOUT:
  163. // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
  164. // CHECK:STDOUT:
  165. // CHECK:STDOUT: fn @F(%c.param_patt: %Class.3) -> i32 {
  166. // CHECK:STDOUT: !entry:
  167. // CHECK:STDOUT: %c.ref: %Class.3 = name_ref c, %c
  168. // CHECK:STDOUT: %x.ref: %.5 = name_ref x, @Class.%.loc12_8.1 [template = @Class.%.loc12_8.1]
  169. // CHECK:STDOUT: %.loc16_11.1: ref i32 = class_element_access %c.ref, element0
  170. // CHECK:STDOUT: %.loc16_11.2: i32 = bind_value %.loc16_11.1
  171. // CHECK:STDOUT: return %.loc16_11.2
  172. // CHECK:STDOUT: }
  173. // CHECK:STDOUT:
  174. // CHECK:STDOUT: generic fn @G(%T.loc19_6.1: type) {
  175. // CHECK:STDOUT: %T.loc19_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc19_6.2 (constants.%T)]
  176. // CHECK:STDOUT: %T.patt.loc19_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_6.2 (constants.%T.patt.2)]
  177. // CHECK:STDOUT: %Class.loc19_24.2: type = class_type @Class, @Class(%T.loc19_6.2) [symbolic = %Class.loc19_24.2 (constants.%Class.2)]
  178. // CHECK:STDOUT:
  179. // CHECK:STDOUT: !definition:
  180. // CHECK:STDOUT: %.loc20_11.3: type = unbound_element_type @G.%Class.loc19_24.2 (%Class.2), @G.%T.loc19_6.2 (%T) [symbolic = %.loc20_11.3 (constants.%.2)]
  181. // CHECK:STDOUT:
  182. // CHECK:STDOUT: fn(%T.param_patt: type, %c.param_patt: @G.%Class.loc19_24.2 (%Class.2)) -> @G.%T.loc19_6.2 (%T) {
  183. // CHECK:STDOUT: !entry:
  184. // CHECK:STDOUT: %c.ref: @G.%Class.loc19_24.2 (%Class.2) = name_ref c, %c
  185. // CHECK:STDOUT: %x.ref: @G.%.loc20_11.3 (%.2) = name_ref x, @Class.%.loc12_8.1 [template = @Class.%.loc12_8.1]
  186. // CHECK:STDOUT: %.loc20_11.1: ref @G.%T.loc19_6.2 (%T) = class_element_access %c.ref, element0
  187. // CHECK:STDOUT: %.loc20_11.2: @G.%T.loc19_6.2 (%T) = bind_value %.loc20_11.1
  188. // CHECK:STDOUT: return %.loc20_11.2
  189. // CHECK:STDOUT: }
  190. // CHECK:STDOUT: }
  191. // CHECK:STDOUT:
  192. // CHECK:STDOUT: generic fn @H(%U.loc23_6.1: type) {
  193. // CHECK:STDOUT: %U.loc23_6.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc23_6.2 (constants.%U)]
  194. // CHECK:STDOUT: %U.patt.loc23_6.2: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc23_6.2 (constants.%U.patt)]
  195. // CHECK:STDOUT: %Class.loc23_24.2: type = class_type @Class, @Class(%U.loc23_6.2) [symbolic = %Class.loc23_24.2 (constants.%Class.4)]
  196. // CHECK:STDOUT:
  197. // CHECK:STDOUT: !definition:
  198. // CHECK:STDOUT: %.loc24_11.3: type = unbound_element_type @H.%Class.loc23_24.2 (%Class.4), @H.%U.loc23_6.2 (%U) [symbolic = %.loc24_11.3 (constants.%.10)]
  199. // CHECK:STDOUT:
  200. // CHECK:STDOUT: fn(%U.param_patt: type, %c.param_patt: @H.%Class.loc23_24.2 (%Class.4)) -> @H.%U.loc23_6.2 (%U) {
  201. // CHECK:STDOUT: !entry:
  202. // CHECK:STDOUT: %c.ref: @H.%Class.loc23_24.2 (%Class.4) = name_ref c, %c
  203. // CHECK:STDOUT: %x.ref: @H.%.loc24_11.3 (%.10) = name_ref x, @Class.%.loc12_8.1 [template = @Class.%.loc12_8.1]
  204. // CHECK:STDOUT: %.loc24_11.1: ref @H.%U.loc23_6.2 (%U) = class_element_access %c.ref, element0
  205. // CHECK:STDOUT: %.loc24_11.2: @H.%U.loc23_6.2 (%U) = bind_value %.loc24_11.1
  206. // CHECK:STDOUT: return %.loc24_11.2
  207. // CHECK:STDOUT: }
  208. // CHECK:STDOUT: }
  209. // CHECK:STDOUT:
  210. // CHECK:STDOUT: specific @Class(constants.%T) {
  211. // CHECK:STDOUT: %T.loc11_13.2 => constants.%T
  212. // CHECK:STDOUT: %T.patt.loc11_13.2 => constants.%T
  213. // CHECK:STDOUT:
  214. // CHECK:STDOUT: !definition:
  215. // CHECK:STDOUT: %Class => constants.%Class.2
  216. // CHECK:STDOUT: %.loc12_8.2 => constants.%.2
  217. // CHECK:STDOUT: %.loc13_1.2 => constants.%.3
  218. // CHECK:STDOUT: %.loc13_1.3 => constants.%.4
  219. // CHECK:STDOUT: }
  220. // CHECK:STDOUT:
  221. // CHECK:STDOUT: specific @Class(@Class.%T.loc11_13.2) {
  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:
  226. // CHECK:STDOUT: specific @Class(i32) {
  227. // CHECK:STDOUT: %T.loc11_13.2 => i32
  228. // CHECK:STDOUT: %T.patt.loc11_13.2 => i32
  229. // CHECK:STDOUT:
  230. // CHECK:STDOUT: !definition:
  231. // CHECK:STDOUT: %Class => constants.%Class.3
  232. // CHECK:STDOUT: %.loc12_8.2 => constants.%.5
  233. // CHECK:STDOUT: %.loc13_1.2 => constants.%.6
  234. // CHECK:STDOUT: %.loc13_1.3 => constants.%.7
  235. // CHECK:STDOUT: }
  236. // CHECK:STDOUT:
  237. // CHECK:STDOUT: specific @Class(@G.%T.loc19_6.2) {
  238. // CHECK:STDOUT: %T.loc11_13.2 => constants.%T
  239. // CHECK:STDOUT: %T.patt.loc11_13.2 => constants.%T
  240. // CHECK:STDOUT: }
  241. // CHECK:STDOUT:
  242. // CHECK:STDOUT: specific @G(constants.%T) {
  243. // CHECK:STDOUT: %T.loc19_6.2 => constants.%T
  244. // CHECK:STDOUT: %T.patt.loc19_6.2 => constants.%T
  245. // CHECK:STDOUT: %Class.loc19_24.2 => constants.%Class.2
  246. // CHECK:STDOUT: }
  247. // CHECK:STDOUT:
  248. // CHECK:STDOUT: specific @Class(constants.%U) {
  249. // CHECK:STDOUT: %T.loc11_13.2 => constants.%U
  250. // CHECK:STDOUT: %T.patt.loc11_13.2 => constants.%U
  251. // CHECK:STDOUT:
  252. // CHECK:STDOUT: !definition:
  253. // CHECK:STDOUT: %Class => constants.%Class.4
  254. // CHECK:STDOUT: %.loc12_8.2 => constants.%.10
  255. // CHECK:STDOUT: %.loc13_1.2 => constants.%.11
  256. // CHECK:STDOUT: %.loc13_1.3 => constants.%.12
  257. // CHECK:STDOUT: }
  258. // CHECK:STDOUT:
  259. // CHECK:STDOUT: specific @Class(@H.%U.loc23_6.2) {
  260. // CHECK:STDOUT: %T.loc11_13.2 => constants.%U
  261. // CHECK:STDOUT: %T.patt.loc11_13.2 => constants.%U
  262. // CHECK:STDOUT: }
  263. // CHECK:STDOUT:
  264. // CHECK:STDOUT: specific @H(constants.%U) {
  265. // CHECK:STDOUT: %U.loc23_6.2 => constants.%U
  266. // CHECK:STDOUT: %U.patt.loc23_6.2 => constants.%U
  267. // CHECK:STDOUT: %Class.loc23_24.2 => constants.%Class.4
  268. // CHECK:STDOUT: }
  269. // CHECK:STDOUT: