include_in_dumps.carbon 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon
  6. //
  7. // This explicitly excludes some files, then set ranges to `if-present` so that
  8. // we can see imports (particularly of `impl`s) from files that would be excluded without
  9. // `//@include-in-dumps`.
  10. // EXTRA-ARGS: --exclude-dump-file-prefix=exclude/ --dump-sem-ir-ranges=if-present
  11. //
  12. // AUTOUPDATE
  13. // TIP: To test this file alone, run:
  14. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/basics/include_in_dumps.carbon
  15. // TIP: To dump output, run:
  16. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/include_in_dumps.carbon
  17. // --- exclude/included.carbon
  18. library "[[@TEST_NAME]]";
  19. //@include-in-dumps
  20. interface I {}
  21. // --- exclude/included_with_range.carbon
  22. library "[[@TEST_NAME]]";
  23. //@include-in-dumps
  24. //@dump-sem-ir-begin
  25. interface I {
  26. fn Op[self: Self]();
  27. }
  28. //@dump-sem-ir-end
  29. class C {
  30. impl C as I {
  31. fn Op[self: Self]() {}
  32. }
  33. }
  34. // --- import_included.carbon
  35. library "[[@TEST_NAME]]";
  36. import library "included_with_range";
  37. fn F(c: C) { c.(I.Op)(); }
  38. // --- exclude/excluded.carbon
  39. library "[[@TEST_NAME]]";
  40. interface I {}
  41. // --- exclude/excluded_with_range.carbon
  42. library "[[@TEST_NAME]]";
  43. //@dump-sem-ir-begin
  44. interface I {
  45. fn Op[self: Self]();
  46. }
  47. //@dump-sem-ir-end
  48. class C {
  49. impl C as I {
  50. fn Op[self: Self]() {}
  51. }
  52. }
  53. // --- import_excluded.carbon
  54. library "[[@TEST_NAME]]";
  55. import library "excluded_with_range";
  56. fn F(c: C) { c.(I.Op)(); }
  57. // CHECK:STDOUT: --- exclude/included.carbon
  58. // CHECK:STDOUT:
  59. // CHECK:STDOUT: constants {
  60. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  61. // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic]
  62. // CHECK:STDOUT: }
  63. // CHECK:STDOUT:
  64. // CHECK:STDOUT: imports {
  65. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  66. // CHECK:STDOUT: import Core//prelude
  67. // CHECK:STDOUT: import Core//prelude/...
  68. // CHECK:STDOUT: }
  69. // CHECK:STDOUT: }
  70. // CHECK:STDOUT:
  71. // CHECK:STDOUT: file {
  72. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  73. // CHECK:STDOUT: .Core = imports.%Core
  74. // CHECK:STDOUT: .I = %I.decl
  75. // CHECK:STDOUT: }
  76. // CHECK:STDOUT: %Core.import = import Core
  77. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  78. // CHECK:STDOUT: }
  79. // CHECK:STDOUT:
  80. // CHECK:STDOUT: interface @I {
  81. // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  82. // CHECK:STDOUT:
  83. // CHECK:STDOUT: !members:
  84. // CHECK:STDOUT: .Self = %Self
  85. // CHECK:STDOUT: witness = ()
  86. // CHECK:STDOUT:
  87. // CHECK:STDOUT: !requires:
  88. // CHECK:STDOUT: }
  89. // CHECK:STDOUT:
  90. // CHECK:STDOUT: --- exclude/included_with_range.carbon
  91. // CHECK:STDOUT:
  92. // CHECK:STDOUT: constants {
  93. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  94. // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic]
  95. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic]
  96. // CHECK:STDOUT: %pattern_type.89c: type = pattern_type %Self.binding.as_type [symbolic]
  97. // CHECK:STDOUT: %I.Op.type: type = fn_type @I.Op [concrete]
  98. // CHECK:STDOUT: %I.Op: %I.Op.type = struct_value () [concrete]
  99. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
  100. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.Op.decl [concrete]
  101. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  102. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness @C.%I.impl_witness_table [concrete]
  103. // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete]
  104. // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete]
  105. // CHECK:STDOUT: }
  106. // CHECK:STDOUT:
  107. // CHECK:STDOUT: imports {
  108. // CHECK:STDOUT: }
  109. // CHECK:STDOUT:
  110. // CHECK:STDOUT: file {
  111. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  112. // CHECK:STDOUT: }
  113. // CHECK:STDOUT:
  114. // CHECK:STDOUT: interface @I {
  115. // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  116. // CHECK:STDOUT: %I.Op.decl: %I.Op.type = fn_decl @I.Op [concrete = constants.%I.Op] {
  117. // CHECK:STDOUT: %self.patt: @I.Op.%pattern_type (%pattern_type.89c) = value_binding_pattern self [concrete]
  118. // CHECK:STDOUT: %self.param_patt: @I.Op.%pattern_type (%pattern_type.89c) = value_param_pattern %self.patt, call_param0 [concrete]
  119. // CHECK:STDOUT: } {
  120. // CHECK:STDOUT: %self.param: @I.Op.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
  121. // CHECK:STDOUT: %.loc8_15.1: type = splice_block %.loc8_15.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
  122. // CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)]
  123. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  124. // CHECK:STDOUT: %.loc8_15.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  125. // CHECK:STDOUT: }
  126. // CHECK:STDOUT: %self: @I.Op.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
  127. // CHECK:STDOUT: }
  128. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.Op.decl [concrete = constants.%assoc0]
  129. // CHECK:STDOUT:
  130. // CHECK:STDOUT: !members:
  131. // CHECK:STDOUT: .Self = %Self
  132. // CHECK:STDOUT: .Op = %assoc0
  133. // CHECK:STDOUT: witness = (%I.Op.decl)
  134. // CHECK:STDOUT:
  135. // CHECK:STDOUT: !requires:
  136. // CHECK:STDOUT: }
  137. // CHECK:STDOUT:
  138. // CHECK:STDOUT: generic fn @I.Op(@I.%Self: %I.type) {
  139. // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
  140. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  141. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.89c)]
  142. // CHECK:STDOUT:
  143. // CHECK:STDOUT: fn(%self.param: @I.Op.%Self.binding.as_type (%Self.binding.as_type));
  144. // CHECK:STDOUT: }
  145. // CHECK:STDOUT:
  146. // CHECK:STDOUT: specific @I.Op(constants.%Self) {
  147. // CHECK:STDOUT: %Self => constants.%Self
  148. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  149. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.89c
  150. // CHECK:STDOUT: }
  151. // CHECK:STDOUT:
  152. // CHECK:STDOUT: specific @I.Op(constants.%I.facet) {
  153. // CHECK:STDOUT: %Self => constants.%I.facet
  154. // CHECK:STDOUT: %Self.binding.as_type => constants.%C
  155. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c48
  156. // CHECK:STDOUT: }
  157. // CHECK:STDOUT:
  158. // CHECK:STDOUT: --- import_included.carbon
  159. // CHECK:STDOUT:
  160. // CHECK:STDOUT: constants {
  161. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  162. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  163. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  164. // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete]
  165. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  166. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  167. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  168. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  169. // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic]
  170. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
  171. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.7d9 [concrete]
  172. // CHECK:STDOUT: %I.Op.type: type = fn_type @I.Op [concrete]
  173. // CHECK:STDOUT: %I.Op: %I.Op.type = struct_value () [concrete]
  174. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic]
  175. // CHECK:STDOUT: %pattern_type.89c: type = pattern_type %Self.binding.as_type [symbolic]
  176. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness imports.%I.impl_witness_table [concrete]
  177. // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete]
  178. // CHECK:STDOUT: %.2b2: type = fn_type_with_self_type %I.Op.type, %I.facet [concrete]
  179. // CHECK:STDOUT: %C.as.I.impl.Op.type: type = fn_type @C.as.I.impl.Op [concrete]
  180. // CHECK:STDOUT: %C.as.I.impl.Op: %C.as.I.impl.Op.type = struct_value () [concrete]
  181. // CHECK:STDOUT: }
  182. // CHECK:STDOUT:
  183. // CHECK:STDOUT: imports {
  184. // CHECK:STDOUT: %Main.I: type = import_ref Main//included_with_range, I, loaded [concrete = constants.%I.type]
  185. // CHECK:STDOUT: %Main.C: type = import_ref Main//included_with_range, C, loaded [concrete = constants.%C]
  186. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  187. // CHECK:STDOUT: import Core//prelude
  188. // CHECK:STDOUT: import Core//prelude/...
  189. // CHECK:STDOUT: }
  190. // CHECK:STDOUT: %Main.import_ref.8f2: <witness> = import_ref Main//included_with_range, loc16_1, loaded [concrete = constants.%complete_type]
  191. // CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//included_with_range, inst{{[0-9A-F]+}} [no loc], unloaded
  192. // CHECK:STDOUT: %Main.import_ref.8df = import_ref Main//included_with_range, loc7_13, unloaded
  193. // CHECK:STDOUT: %Main.import_ref.9cd: %I.assoc_type = import_ref Main//included_with_range, loc8_22, loaded [concrete = constants.%assoc0]
  194. // CHECK:STDOUT: %Main.Op = import_ref Main//included_with_range, Op, unloaded
  195. // CHECK:STDOUT: %Main.import_ref.7d9: %I.Op.type = import_ref Main//included_with_range, loc8_22, loaded [concrete = constants.%I.Op]
  196. // CHECK:STDOUT: %Main.import_ref.e33: %I.type = import_ref Main//included_with_range, loc7_13, loaded [symbolic = constants.%Self]
  197. // CHECK:STDOUT: %Main.import_ref.3a9: <witness> = import_ref Main//included_with_range, loc13_15, loaded [concrete = constants.%I.impl_witness]
  198. // CHECK:STDOUT: %Main.import_ref.29a: type = import_ref Main//included_with_range, loc13_8, loaded [concrete = constants.%C]
  199. // CHECK:STDOUT: %Main.import_ref.301: type = import_ref Main//included_with_range, loc13_13, loaded [concrete = constants.%I.type]
  200. // CHECK:STDOUT: %Main.import_ref.2a1: %C.as.I.impl.Op.type = import_ref Main//included_with_range, loc14_25, loaded [concrete = constants.%C.as.I.impl.Op]
  201. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.2a1), @C.as.I.impl [concrete]
  202. // CHECK:STDOUT: }
  203. // CHECK:STDOUT:
  204. // CHECK:STDOUT: file {
  205. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  206. // CHECK:STDOUT: .I = imports.%Main.I
  207. // CHECK:STDOUT: .C = imports.%Main.C
  208. // CHECK:STDOUT: .Core = imports.%Core
  209. // CHECK:STDOUT: .F = %F.decl
  210. // CHECK:STDOUT: }
  211. // CHECK:STDOUT: %Core.import = import Core
  212. // CHECK:STDOUT: %default.import = import <none>
  213. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
  214. // CHECK:STDOUT: %c.patt: %pattern_type.c48 = value_binding_pattern c [concrete]
  215. // CHECK:STDOUT: %c.param_patt: %pattern_type.c48 = value_param_pattern %c.patt, call_param0 [concrete]
  216. // CHECK:STDOUT: } {
  217. // CHECK:STDOUT: %c.param: %C = value_param call_param0
  218. // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
  219. // CHECK:STDOUT: %c: %C = value_binding c, %c.param
  220. // CHECK:STDOUT: }
  221. // CHECK:STDOUT: }
  222. // CHECK:STDOUT:
  223. // CHECK:STDOUT: interface @I [from "exclude/included_with_range.carbon"] {
  224. // CHECK:STDOUT: !members:
  225. // CHECK:STDOUT: .Self = imports.%Main.import_ref.8df
  226. // CHECK:STDOUT: .Op = imports.%Main.import_ref.9cd
  227. // CHECK:STDOUT: witness = (imports.%Main.Op)
  228. // CHECK:STDOUT:
  229. // CHECK:STDOUT: !requires:
  230. // CHECK:STDOUT: }
  231. // CHECK:STDOUT:
  232. // CHECK:STDOUT: impl @C.as.I.impl: imports.%Main.import_ref.29a as imports.%Main.import_ref.301 [from "exclude/included_with_range.carbon"] {
  233. // CHECK:STDOUT: !members:
  234. // CHECK:STDOUT: witness = imports.%Main.import_ref.3a9
  235. // CHECK:STDOUT: }
  236. // CHECK:STDOUT:
  237. // CHECK:STDOUT: class @C [from "exclude/included_with_range.carbon"] {
  238. // CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f2
  239. // CHECK:STDOUT:
  240. // CHECK:STDOUT: !members:
  241. // CHECK:STDOUT: .Self = imports.%Main.import_ref.2c4
  242. // CHECK:STDOUT: }
  243. // CHECK:STDOUT:
  244. // CHECK:STDOUT: fn @F(%c.param: %C) {
  245. // CHECK:STDOUT: !entry:
  246. // CHECK:STDOUT: %c.ref: %C = name_ref c, %c
  247. // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type]
  248. // CHECK:STDOUT: %Op.ref: %I.assoc_type = name_ref Op, imports.%Main.import_ref.9cd [concrete = constants.%assoc0]
  249. // CHECK:STDOUT: %impl.elem0: %.2b2 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%C.as.I.impl.Op]
  250. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %c.ref, %impl.elem0
  251. // CHECK:STDOUT: %C.as.I.impl.Op.call: init %empty_tuple.type = call %bound_method(%c.ref)
  252. // CHECK:STDOUT: return
  253. // CHECK:STDOUT: }
  254. // CHECK:STDOUT:
  255. // CHECK:STDOUT: generic fn @I.Op(imports.%Main.import_ref.e33: %I.type) [from "exclude/included_with_range.carbon"] {
  256. // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
  257. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  258. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.89c)]
  259. // CHECK:STDOUT:
  260. // CHECK:STDOUT: fn;
  261. // CHECK:STDOUT: }
  262. // CHECK:STDOUT:
  263. // CHECK:STDOUT: fn @C.as.I.impl.Op [from "exclude/included_with_range.carbon"];
  264. // CHECK:STDOUT:
  265. // CHECK:STDOUT: specific @I.Op(constants.%Self) {
  266. // CHECK:STDOUT: %Self => constants.%Self
  267. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  268. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.89c
  269. // CHECK:STDOUT: }
  270. // CHECK:STDOUT:
  271. // CHECK:STDOUT: --- import_excluded.carbon
  272. // CHECK:STDOUT:
  273. // CHECK:STDOUT: constants {
  274. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  275. // CHECK:STDOUT: %pattern_type.c48: type = pattern_type %C [concrete]
  276. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  277. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  278. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  279. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  280. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
  281. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.7d9 [concrete]
  282. // CHECK:STDOUT: %I.Op.type: type = fn_type @I.Op [concrete]
  283. // CHECK:STDOUT: %I.Op: %I.Op.type = struct_value () [concrete]
  284. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness imports.%I.impl_witness_table [concrete]
  285. // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete]
  286. // CHECK:STDOUT: %.2b2: type = fn_type_with_self_type %I.Op.type, %I.facet [concrete]
  287. // CHECK:STDOUT: %C.as.I.impl.Op.type: type = fn_type @C.as.I.impl.Op [concrete]
  288. // CHECK:STDOUT: %C.as.I.impl.Op: %C.as.I.impl.Op.type = struct_value () [concrete]
  289. // CHECK:STDOUT: }
  290. // CHECK:STDOUT:
  291. // CHECK:STDOUT: imports {
  292. // CHECK:STDOUT: %Main.I: type = import_ref Main//excluded_with_range, I, loaded [concrete = constants.%I.type]
  293. // CHECK:STDOUT: %Main.C: type = import_ref Main//excluded_with_range, C, loaded [concrete = constants.%C]
  294. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  295. // CHECK:STDOUT: import Core//prelude
  296. // CHECK:STDOUT: import Core//prelude/...
  297. // CHECK:STDOUT: }
  298. // CHECK:STDOUT: %Main.import_ref.9cd: %I.assoc_type = import_ref Main//excluded_with_range, loc6_22, loaded [concrete = constants.%assoc0]
  299. // CHECK:STDOUT: %Main.import_ref.7d9: %I.Op.type = import_ref Main//excluded_with_range, loc6_22, loaded [concrete = constants.%I.Op]
  300. // CHECK:STDOUT: %Main.import_ref.2a1: %C.as.I.impl.Op.type = import_ref Main//excluded_with_range, loc12_25, loaded [concrete = constants.%C.as.I.impl.Op]
  301. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.2a1), @C.as.I.impl [concrete]
  302. // CHECK:STDOUT: }
  303. // CHECK:STDOUT:
  304. // CHECK:STDOUT: file {
  305. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  306. // CHECK:STDOUT: .I = imports.%Main.I
  307. // CHECK:STDOUT: .C = imports.%Main.C
  308. // CHECK:STDOUT: .Core = imports.%Core
  309. // CHECK:STDOUT: .F = %F.decl
  310. // CHECK:STDOUT: }
  311. // CHECK:STDOUT: %Core.import = import Core
  312. // CHECK:STDOUT: %default.import = import <none>
  313. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
  314. // CHECK:STDOUT: %c.patt: %pattern_type.c48 = value_binding_pattern c [concrete]
  315. // CHECK:STDOUT: %c.param_patt: %pattern_type.c48 = value_param_pattern %c.patt, call_param0 [concrete]
  316. // CHECK:STDOUT: } {
  317. // CHECK:STDOUT: %c.param: %C = value_param call_param0
  318. // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
  319. // CHECK:STDOUT: %c: %C = value_binding c, %c.param
  320. // CHECK:STDOUT: }
  321. // CHECK:STDOUT: }
  322. // CHECK:STDOUT:
  323. // CHECK:STDOUT: fn @F(%c.param: %C) {
  324. // CHECK:STDOUT: !entry:
  325. // CHECK:STDOUT: %c.ref: %C = name_ref c, %c
  326. // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type]
  327. // CHECK:STDOUT: %Op.ref: %I.assoc_type = name_ref Op, imports.%Main.import_ref.9cd [concrete = constants.%assoc0]
  328. // CHECK:STDOUT: %impl.elem0: %.2b2 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%C.as.I.impl.Op]
  329. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %c.ref, %impl.elem0
  330. // CHECK:STDOUT: %C.as.I.impl.Op.call: init %empty_tuple.type = call %bound_method(%c.ref)
  331. // CHECK:STDOUT: return
  332. // CHECK:STDOUT: }
  333. // CHECK:STDOUT: