reorder_qualified.carbon 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  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/reorder_qualified.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/reorder_qualified.carbon
  10. class A {
  11. class B {
  12. class C;
  13. fn BF();
  14. var b: i32;
  15. }
  16. class B.C {
  17. class D {
  18. fn F();
  19. fn DF();
  20. var d: i32;
  21. }
  22. fn D.DF() {
  23. // A, B, C, and D are complete here.
  24. var a: A = {.a = 1};
  25. var b: B = {.b = 2};
  26. var c: C = {.c = 3};
  27. var d: D = {.d = 4};
  28. // Unqualified lookup looks in all of them.
  29. AF();
  30. BF();
  31. CF();
  32. DF();
  33. }
  34. fn CF();
  35. var c: i32;
  36. }
  37. fn AF();
  38. var a: i32;
  39. }
  40. // CHECK:STDOUT: --- reorder_qualified.carbon
  41. // CHECK:STDOUT:
  42. // CHECK:STDOUT: constants {
  43. // CHECK:STDOUT: %A: type = class_type @A [template]
  44. // CHECK:STDOUT: %B: type = class_type @B [template]
  45. // CHECK:STDOUT: %C: type = class_type @C [template]
  46. // CHECK:STDOUT: %BF.type: type = fn_type @BF [template]
  47. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
  48. // CHECK:STDOUT: %BF: %BF.type = struct_value () [template]
  49. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
  50. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
  51. // CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %i32 [template]
  52. // CHECK:STDOUT: %struct_type.b.0a3: type = struct_type {.b: %i32} [template]
  53. // CHECK:STDOUT: %complete_type.ba8: <witness> = complete_type_witness %struct_type.b.0a3 [template]
  54. // CHECK:STDOUT: %D: type = class_type @D [template]
  55. // CHECK:STDOUT: %F.type: type = fn_type @F [template]
  56. // CHECK:STDOUT: %F: %F.type = struct_value () [template]
  57. // CHECK:STDOUT: %DF.type: type = fn_type @DF [template]
  58. // CHECK:STDOUT: %DF: %DF.type = struct_value () [template]
  59. // CHECK:STDOUT: %D.elem: type = unbound_element_type %D, %i32 [template]
  60. // CHECK:STDOUT: %struct_type.d.b7b: type = struct_type {.d: %i32} [template]
  61. // CHECK:STDOUT: %complete_type.860: <witness> = complete_type_witness %struct_type.d.b7b [template]
  62. // CHECK:STDOUT: %CF.type: type = fn_type @CF [template]
  63. // CHECK:STDOUT: %CF: %CF.type = struct_value () [template]
  64. // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %i32 [template]
  65. // CHECK:STDOUT: %struct_type.c.b66: type = struct_type {.c: %i32} [template]
  66. // CHECK:STDOUT: %complete_type.836: <witness> = complete_type_witness %struct_type.c.b66 [template]
  67. // CHECK:STDOUT: %AF.type: type = fn_type @AF [template]
  68. // CHECK:STDOUT: %AF: %AF.type = struct_value () [template]
  69. // CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [template]
  70. // CHECK:STDOUT: %struct_type.a.ba9: type = struct_type {.a: %i32} [template]
  71. // CHECK:STDOUT: %complete_type.fd7: <witness> = complete_type_witness %struct_type.a.ba9 [template]
  72. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [template]
  73. // CHECK:STDOUT: %struct_type.a.a6c: type = struct_type {.a: Core.IntLiteral} [template]
  74. // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template]
  75. // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
  76. // CHECK:STDOUT: %impl_witness.d39: <witness> = impl_witness (imports.%Core.import_ref.a5b), @impl.1(%int_32) [template]
  77. // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.1(%int_32) [template]
  78. // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [template]
  79. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, %impl_witness.d39 [template]
  80. // CHECK:STDOUT: %.a0b: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [template]
  81. // CHECK:STDOUT: %Convert.bound.ab5: <bound method> = bound_method %int_1.5b8, %Convert.956 [template]
  82. // CHECK:STDOUT: %Convert.specific_fn.70c: <specific function> = specific_function %Convert.bound.ab5, @Convert.2(%int_32) [template]
  83. // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [template]
  84. // CHECK:STDOUT: %A.val: %A = struct_value (%int_1.5d2) [template]
  85. // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [template]
  86. // CHECK:STDOUT: %struct_type.b.a15: type = struct_type {.b: Core.IntLiteral} [template]
  87. // CHECK:STDOUT: %Convert.bound.ef9: <bound method> = bound_method %int_2.ecc, %Convert.956 [template]
  88. // CHECK:STDOUT: %Convert.specific_fn.787: <specific function> = specific_function %Convert.bound.ef9, @Convert.2(%int_32) [template]
  89. // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [template]
  90. // CHECK:STDOUT: %B.val: %B = struct_value (%int_2.ef8) [template]
  91. // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [template]
  92. // CHECK:STDOUT: %struct_type.c.5b8: type = struct_type {.c: Core.IntLiteral} [template]
  93. // CHECK:STDOUT: %Convert.bound.b30: <bound method> = bound_method %int_3.1ba, %Convert.956 [template]
  94. // CHECK:STDOUT: %Convert.specific_fn.b42: <specific function> = specific_function %Convert.bound.b30, @Convert.2(%int_32) [template]
  95. // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [template]
  96. // CHECK:STDOUT: %C.val: %C = struct_value (%int_3.822) [template]
  97. // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [template]
  98. // CHECK:STDOUT: %struct_type.d.3ea: type = struct_type {.d: Core.IntLiteral} [template]
  99. // CHECK:STDOUT: %Convert.bound.ac3: <bound method> = bound_method %int_4.0c1, %Convert.956 [template]
  100. // CHECK:STDOUT: %Convert.specific_fn.450: <specific function> = specific_function %Convert.bound.ac3, @Convert.2(%int_32) [template]
  101. // CHECK:STDOUT: %int_4.940: %i32 = int_value 4 [template]
  102. // CHECK:STDOUT: %D.val: %D = struct_value (%int_4.940) [template]
  103. // CHECK:STDOUT: }
  104. // CHECK:STDOUT:
  105. // CHECK:STDOUT: imports {
  106. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
  107. // CHECK:STDOUT: .Int = %Core.Int
  108. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  109. // CHECK:STDOUT: import Core//prelude
  110. // CHECK:STDOUT: import Core//prelude/...
  111. // CHECK:STDOUT: }
  112. // CHECK:STDOUT: }
  113. // CHECK:STDOUT:
  114. // CHECK:STDOUT: file {
  115. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  116. // CHECK:STDOUT: .Core = imports.%Core
  117. // CHECK:STDOUT: .A = %A.decl
  118. // CHECK:STDOUT: }
  119. // CHECK:STDOUT: %Core.import = import Core
  120. // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {}
  121. // CHECK:STDOUT: }
  122. // CHECK:STDOUT:
  123. // CHECK:STDOUT: class @A {
  124. // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {}
  125. // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {}
  126. // CHECK:STDOUT: %AF.decl: %AF.type = fn_decl @AF [template = constants.%AF] {} {}
  127. // CHECK:STDOUT: %.loc46_8: %A.elem = field_decl a, element0 [template]
  128. // CHECK:STDOUT: name_binding_decl {
  129. // CHECK:STDOUT: %.loc46_3: %A.elem = var_pattern %.loc46_8
  130. // CHECK:STDOUT: }
  131. // CHECK:STDOUT: %.var: ref %A.elem = var <none>
  132. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.a.ba9 [template = constants.%complete_type.fd7]
  133. // CHECK:STDOUT: complete_type_witness = %complete_type
  134. // CHECK:STDOUT:
  135. // CHECK:STDOUT: !members:
  136. // CHECK:STDOUT: .Self = constants.%A
  137. // CHECK:STDOUT: .B = %B.decl
  138. // CHECK:STDOUT: .AF = %AF.decl
  139. // CHECK:STDOUT: .a = %.loc46_8
  140. // CHECK:STDOUT: }
  141. // CHECK:STDOUT:
  142. // CHECK:STDOUT: class @B {
  143. // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {}
  144. // CHECK:STDOUT: %BF.decl: %BF.type = fn_decl @BF [template = constants.%BF] {} {}
  145. // CHECK:STDOUT: %.loc16_10: %B.elem = field_decl b, element0 [template]
  146. // CHECK:STDOUT: name_binding_decl {
  147. // CHECK:STDOUT: %.loc16_5: %B.elem = var_pattern %.loc16_10
  148. // CHECK:STDOUT: }
  149. // CHECK:STDOUT: %.var: ref %B.elem = var <none>
  150. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.b.0a3 [template = constants.%complete_type.ba8]
  151. // CHECK:STDOUT: complete_type_witness = %complete_type
  152. // CHECK:STDOUT:
  153. // CHECK:STDOUT: !members:
  154. // CHECK:STDOUT: .Self = constants.%B
  155. // CHECK:STDOUT: .C = %C.decl
  156. // CHECK:STDOUT: .BF = %BF.decl
  157. // CHECK:STDOUT: .b = %.loc16_10
  158. // CHECK:STDOUT: }
  159. // CHECK:STDOUT:
  160. // CHECK:STDOUT: class @C {
  161. // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} {}
  162. // CHECK:STDOUT: %DF.decl: %DF.type = fn_decl @DF [template = constants.%DF] {} {}
  163. // CHECK:STDOUT: %CF.decl: %CF.type = fn_decl @CF [template = constants.%CF] {} {}
  164. // CHECK:STDOUT: %.loc42_10: %C.elem = field_decl c, element0 [template]
  165. // CHECK:STDOUT: name_binding_decl {
  166. // CHECK:STDOUT: %.loc42_5: %C.elem = var_pattern %.loc42_10
  167. // CHECK:STDOUT: }
  168. // CHECK:STDOUT: %.var: ref %C.elem = var <none>
  169. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.c.b66 [template = constants.%complete_type.836]
  170. // CHECK:STDOUT: complete_type_witness = %complete_type
  171. // CHECK:STDOUT:
  172. // CHECK:STDOUT: !members:
  173. // CHECK:STDOUT: .Self = constants.%C
  174. // CHECK:STDOUT: .D = %D.decl
  175. // CHECK:STDOUT: .CF = %CF.decl
  176. // CHECK:STDOUT: .c = %.loc42_10
  177. // CHECK:STDOUT: }
  178. // CHECK:STDOUT:
  179. // CHECK:STDOUT: class @D {
  180. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {}
  181. // CHECK:STDOUT: %DF.decl: %DF.type = fn_decl @DF [template = constants.%DF] {} {}
  182. // CHECK:STDOUT: %.loc24_12: %D.elem = field_decl d, element0 [template]
  183. // CHECK:STDOUT: name_binding_decl {
  184. // CHECK:STDOUT: %.loc24_7: %D.elem = var_pattern %.loc24_12
  185. // CHECK:STDOUT: }
  186. // CHECK:STDOUT: %.var: ref %D.elem = var <none>
  187. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %struct_type.d.b7b [template = constants.%complete_type.860]
  188. // CHECK:STDOUT: complete_type_witness = %complete_type
  189. // CHECK:STDOUT:
  190. // CHECK:STDOUT: !members:
  191. // CHECK:STDOUT: .Self = constants.%D
  192. // CHECK:STDOUT: .F = %F.decl
  193. // CHECK:STDOUT: .DF = %DF.decl
  194. // CHECK:STDOUT: .d = %.loc24_12
  195. // CHECK:STDOUT: }
  196. // CHECK:STDOUT:
  197. // CHECK:STDOUT: fn @BF();
  198. // CHECK:STDOUT:
  199. // CHECK:STDOUT: fn @F();
  200. // CHECK:STDOUT:
  201. // CHECK:STDOUT: fn @DF() {
  202. // CHECK:STDOUT: !entry:
  203. // CHECK:STDOUT: name_binding_decl {
  204. // CHECK:STDOUT: %a.patt: %A = binding_pattern a
  205. // CHECK:STDOUT: %.loc29_7.1: %A = var_pattern %a.patt
  206. // CHECK:STDOUT: }
  207. // CHECK:STDOUT: %a.var: ref %A = var a
  208. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.5b8]
  209. // CHECK:STDOUT: %.loc29_25.1: %struct_type.a.a6c = struct_literal (%int_1)
  210. // CHECK:STDOUT: %impl.elem0.loc29: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
  211. // CHECK:STDOUT: %bound_method.loc29: <bound method> = bound_method %int_1, %impl.elem0.loc29 [template = constants.%Convert.bound.ab5]
  212. // CHECK:STDOUT: %specific_fn.loc29: <specific function> = specific_function %bound_method.loc29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.70c]
  213. // CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %specific_fn.loc29(%int_1) [template = constants.%int_1.5d2]
  214. // CHECK:STDOUT: %.loc29_25.2: init %i32 = converted %int_1, %int.convert_checked.loc29 [template = constants.%int_1.5d2]
  215. // CHECK:STDOUT: %.loc29_25.3: ref %i32 = class_element_access %a.var, element0
  216. // CHECK:STDOUT: %.loc29_25.4: init %i32 = initialize_from %.loc29_25.2 to %.loc29_25.3 [template = constants.%int_1.5d2]
  217. // CHECK:STDOUT: %.loc29_25.5: init %A = class_init (%.loc29_25.4), %a.var [template = constants.%A.val]
  218. // CHECK:STDOUT: %.loc29_7.2: init %A = converted %.loc29_25.1, %.loc29_25.5 [template = constants.%A.val]
  219. // CHECK:STDOUT: assign %a.var, %.loc29_7.2
  220. // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A]
  221. // CHECK:STDOUT: %a: ref %A = bind_name a, %a.var
  222. // CHECK:STDOUT: name_binding_decl {
  223. // CHECK:STDOUT: %b.patt: %B = binding_pattern b
  224. // CHECK:STDOUT: %.loc30_7.1: %B = var_pattern %b.patt
  225. // CHECK:STDOUT: }
  226. // CHECK:STDOUT: %b.var: ref %B = var b
  227. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.ecc]
  228. // CHECK:STDOUT: %.loc30_25.1: %struct_type.b.a15 = struct_literal (%int_2)
  229. // CHECK:STDOUT: %impl.elem0.loc30: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
  230. // CHECK:STDOUT: %bound_method.loc30: <bound method> = bound_method %int_2, %impl.elem0.loc30 [template = constants.%Convert.bound.ef9]
  231. // CHECK:STDOUT: %specific_fn.loc30: <specific function> = specific_function %bound_method.loc30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.787]
  232. // CHECK:STDOUT: %int.convert_checked.loc30: init %i32 = call %specific_fn.loc30(%int_2) [template = constants.%int_2.ef8]
  233. // CHECK:STDOUT: %.loc30_25.2: init %i32 = converted %int_2, %int.convert_checked.loc30 [template = constants.%int_2.ef8]
  234. // CHECK:STDOUT: %.loc30_25.3: ref %i32 = class_element_access %b.var, element0
  235. // CHECK:STDOUT: %.loc30_25.4: init %i32 = initialize_from %.loc30_25.2 to %.loc30_25.3 [template = constants.%int_2.ef8]
  236. // CHECK:STDOUT: %.loc30_25.5: init %B = class_init (%.loc30_25.4), %b.var [template = constants.%B.val]
  237. // CHECK:STDOUT: %.loc30_7.2: init %B = converted %.loc30_25.1, %.loc30_25.5 [template = constants.%B.val]
  238. // CHECK:STDOUT: assign %b.var, %.loc30_7.2
  239. // CHECK:STDOUT: %B.ref: type = name_ref B, @A.%B.decl [template = constants.%B]
  240. // CHECK:STDOUT: %b: ref %B = bind_name b, %b.var
  241. // CHECK:STDOUT: name_binding_decl {
  242. // CHECK:STDOUT: %c.patt: %C = binding_pattern c
  243. // CHECK:STDOUT: %.loc31_7.1: %C = var_pattern %c.patt
  244. // CHECK:STDOUT: }
  245. // CHECK:STDOUT: %c.var: ref %C = var c
  246. // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1ba]
  247. // CHECK:STDOUT: %.loc31_25.1: %struct_type.c.5b8 = struct_literal (%int_3)
  248. // CHECK:STDOUT: %impl.elem0.loc31: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
  249. // CHECK:STDOUT: %bound_method.loc31: <bound method> = bound_method %int_3, %impl.elem0.loc31 [template = constants.%Convert.bound.b30]
  250. // CHECK:STDOUT: %specific_fn.loc31: <specific function> = specific_function %bound_method.loc31, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.b42]
  251. // CHECK:STDOUT: %int.convert_checked.loc31: init %i32 = call %specific_fn.loc31(%int_3) [template = constants.%int_3.822]
  252. // CHECK:STDOUT: %.loc31_25.2: init %i32 = converted %int_3, %int.convert_checked.loc31 [template = constants.%int_3.822]
  253. // CHECK:STDOUT: %.loc31_25.3: ref %i32 = class_element_access %c.var, element0
  254. // CHECK:STDOUT: %.loc31_25.4: init %i32 = initialize_from %.loc31_25.2 to %.loc31_25.3 [template = constants.%int_3.822]
  255. // CHECK:STDOUT: %.loc31_25.5: init %C = class_init (%.loc31_25.4), %c.var [template = constants.%C.val]
  256. // CHECK:STDOUT: %.loc31_7.2: init %C = converted %.loc31_25.1, %.loc31_25.5 [template = constants.%C.val]
  257. // CHECK:STDOUT: assign %c.var, %.loc31_7.2
  258. // CHECK:STDOUT: %C.ref: type = name_ref C, @B.%C.decl [template = constants.%C]
  259. // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var
  260. // CHECK:STDOUT: name_binding_decl {
  261. // CHECK:STDOUT: %d.patt: %D = binding_pattern d
  262. // CHECK:STDOUT: %.loc32_7.1: %D = var_pattern %d.patt
  263. // CHECK:STDOUT: }
  264. // CHECK:STDOUT: %d.var: ref %D = var d
  265. // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.0c1]
  266. // CHECK:STDOUT: %.loc32_25.1: %struct_type.d.3ea = struct_literal (%int_4)
  267. // CHECK:STDOUT: %impl.elem0.loc32: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
  268. // CHECK:STDOUT: %bound_method.loc32: <bound method> = bound_method %int_4, %impl.elem0.loc32 [template = constants.%Convert.bound.ac3]
  269. // CHECK:STDOUT: %specific_fn.loc32: <specific function> = specific_function %bound_method.loc32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.450]
  270. // CHECK:STDOUT: %int.convert_checked.loc32: init %i32 = call %specific_fn.loc32(%int_4) [template = constants.%int_4.940]
  271. // CHECK:STDOUT: %.loc32_25.2: init %i32 = converted %int_4, %int.convert_checked.loc32 [template = constants.%int_4.940]
  272. // CHECK:STDOUT: %.loc32_25.3: ref %i32 = class_element_access %d.var, element0
  273. // CHECK:STDOUT: %.loc32_25.4: init %i32 = initialize_from %.loc32_25.2 to %.loc32_25.3 [template = constants.%int_4.940]
  274. // CHECK:STDOUT: %.loc32_25.5: init %D = class_init (%.loc32_25.4), %d.var [template = constants.%D.val]
  275. // CHECK:STDOUT: %.loc32_7.2: init %D = converted %.loc32_25.1, %.loc32_25.5 [template = constants.%D.val]
  276. // CHECK:STDOUT: assign %d.var, %.loc32_7.2
  277. // CHECK:STDOUT: %D.ref: type = name_ref D, @C.%D.decl [template = constants.%D]
  278. // CHECK:STDOUT: %d: ref %D = bind_name d, %d.var
  279. // CHECK:STDOUT: %AF.ref: %AF.type = name_ref AF, @A.%AF.decl [template = constants.%AF]
  280. // CHECK:STDOUT: %AF.call: init %empty_tuple.type = call %AF.ref()
  281. // CHECK:STDOUT: %BF.ref: %BF.type = name_ref BF, @B.%BF.decl [template = constants.%BF]
  282. // CHECK:STDOUT: %BF.call: init %empty_tuple.type = call %BF.ref()
  283. // CHECK:STDOUT: %CF.ref: %CF.type = name_ref CF, @C.%CF.decl [template = constants.%CF]
  284. // CHECK:STDOUT: %CF.call: init %empty_tuple.type = call %CF.ref()
  285. // CHECK:STDOUT: %DF.ref: %DF.type = name_ref DF, @D.%DF.decl [template = constants.%DF]
  286. // CHECK:STDOUT: %DF.call: init %empty_tuple.type = call %DF.ref()
  287. // CHECK:STDOUT: return
  288. // CHECK:STDOUT: }
  289. // CHECK:STDOUT:
  290. // CHECK:STDOUT: fn @CF();
  291. // CHECK:STDOUT:
  292. // CHECK:STDOUT: fn @AF();
  293. // CHECK:STDOUT: