import.carbon 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  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/int.carbon
  6. // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
  7. // EXTRA-ARGS: --dump-sem-ir-ranges=if-present
  8. //
  9. // AUTOUPDATE
  10. // TIP: To test this file alone, run:
  11. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/class/import.carbon
  12. // TIP: To dump output, run:
  13. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/import.carbon
  14. // --- a.carbon
  15. library "[[@TEST_NAME]]";
  16. class Empty {
  17. }
  18. class Field {
  19. var x: i32;
  20. }
  21. class ForwardDeclared;
  22. class ForwardDeclared {
  23. fn F[self: Self]();
  24. fn G[ref self: Self]();
  25. }
  26. class Incomplete;
  27. // --- b.carbon
  28. library "[[@TEST_NAME]]";
  29. import library "a";
  30. fn Run() {
  31. var a: Empty = {};
  32. var b: Field = {.x = 1};
  33. b.x = 2;
  34. var c: ForwardDeclared = {};
  35. c.F();
  36. c.G();
  37. var d: ForwardDeclared* = &c;
  38. var e: Incomplete*;
  39. }
  40. // CHECK:STDOUT: --- a.carbon
  41. // CHECK:STDOUT:
  42. // CHECK:STDOUT: constants {
  43. // CHECK:STDOUT: %Empty: type = class_type @Empty [concrete]
  44. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  45. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  46. // CHECK:STDOUT: %Field: type = class_type @Field [concrete]
  47. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  48. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  49. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  50. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  51. // CHECK:STDOUT: %Field.elem: type = unbound_element_type %Field, %i32 [concrete]
  52. // CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %i32} [concrete]
  53. // CHECK:STDOUT: %complete_type.1ec: <witness> = complete_type_witness %struct_type.x [concrete]
  54. // CHECK:STDOUT: %ForwardDeclared: type = class_type @ForwardDeclared [concrete]
  55. // CHECK:STDOUT: %pattern_type.1b8: type = pattern_type %ForwardDeclared [concrete]
  56. // CHECK:STDOUT: %ForwardDeclared.F.type: type = fn_type @ForwardDeclared.F [concrete]
  57. // CHECK:STDOUT: %ForwardDeclared.F: %ForwardDeclared.F.type = struct_value () [concrete]
  58. // CHECK:STDOUT: %ForwardDeclared.G.type: type = fn_type @ForwardDeclared.G [concrete]
  59. // CHECK:STDOUT: %ForwardDeclared.G: %ForwardDeclared.G.type = struct_value () [concrete]
  60. // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [concrete]
  61. // CHECK:STDOUT: }
  62. // CHECK:STDOUT:
  63. // CHECK:STDOUT: imports {
  64. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  65. // CHECK:STDOUT: .Int = %Core.Int
  66. // CHECK:STDOUT: import Core//prelude
  67. // CHECK:STDOUT: import Core//prelude/...
  68. // CHECK:STDOUT: }
  69. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
  70. // CHECK:STDOUT: }
  71. // CHECK:STDOUT:
  72. // CHECK:STDOUT: file {
  73. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  74. // CHECK:STDOUT: .Core = imports.%Core
  75. // CHECK:STDOUT: .Empty = %Empty.decl
  76. // CHECK:STDOUT: .Field = %Field.decl
  77. // CHECK:STDOUT: .ForwardDeclared = %ForwardDeclared.decl.loc11
  78. // CHECK:STDOUT: .Incomplete = %Incomplete.decl
  79. // CHECK:STDOUT: }
  80. // CHECK:STDOUT: %Core.import = import Core
  81. // CHECK:STDOUT: %Empty.decl: type = class_decl @Empty [concrete = constants.%Empty] {} {}
  82. // CHECK:STDOUT: %Field.decl: type = class_decl @Field [concrete = constants.%Field] {} {}
  83. // CHECK:STDOUT: %ForwardDeclared.decl.loc11: type = class_decl @ForwardDeclared [concrete = constants.%ForwardDeclared] {} {}
  84. // CHECK:STDOUT: %ForwardDeclared.decl.loc13: type = class_decl @ForwardDeclared [concrete = constants.%ForwardDeclared] {} {}
  85. // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [concrete = constants.%Incomplete] {} {}
  86. // CHECK:STDOUT: }
  87. // CHECK:STDOUT:
  88. // CHECK:STDOUT: class @Empty {
  89. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  90. // CHECK:STDOUT: complete_type_witness = %complete_type
  91. // CHECK:STDOUT:
  92. // CHECK:STDOUT: !members:
  93. // CHECK:STDOUT: .Self = constants.%Empty
  94. // CHECK:STDOUT: }
  95. // CHECK:STDOUT:
  96. // CHECK:STDOUT: class @Field {
  97. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  98. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  99. // CHECK:STDOUT: %.loc8: %Field.elem = field_decl x, element0 [concrete]
  100. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%struct_type.x [concrete = constants.%complete_type.1ec]
  101. // CHECK:STDOUT: complete_type_witness = %complete_type
  102. // CHECK:STDOUT:
  103. // CHECK:STDOUT: !members:
  104. // CHECK:STDOUT: .Self = constants.%Field
  105. // CHECK:STDOUT: .x = %.loc8
  106. // CHECK:STDOUT: }
  107. // CHECK:STDOUT:
  108. // CHECK:STDOUT: class @ForwardDeclared {
  109. // CHECK:STDOUT: %ForwardDeclared.F.decl: %ForwardDeclared.F.type = fn_decl @ForwardDeclared.F [concrete = constants.%ForwardDeclared.F] {
  110. // CHECK:STDOUT: %self.patt: %pattern_type.1b8 = value_binding_pattern self [concrete]
  111. // CHECK:STDOUT: %self.param_patt: %pattern_type.1b8 = value_param_pattern %self.patt, call_param0 [concrete]
  112. // CHECK:STDOUT: } {
  113. // CHECK:STDOUT: %self.param: %ForwardDeclared = value_param call_param0
  114. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%ForwardDeclared [concrete = constants.%ForwardDeclared]
  115. // CHECK:STDOUT: %self: %ForwardDeclared = value_binding self, %self.param
  116. // CHECK:STDOUT: }
  117. // CHECK:STDOUT: %ForwardDeclared.G.decl: %ForwardDeclared.G.type = fn_decl @ForwardDeclared.G [concrete = constants.%ForwardDeclared.G] {
  118. // CHECK:STDOUT: %self.patt: %pattern_type.1b8 = ref_binding_pattern self [concrete]
  119. // CHECK:STDOUT: %self.param_patt: %pattern_type.1b8 = ref_param_pattern %self.patt, call_param0 [concrete]
  120. // CHECK:STDOUT: } {
  121. // CHECK:STDOUT: %self.param: ref %ForwardDeclared = ref_param call_param0
  122. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%ForwardDeclared [concrete = constants.%ForwardDeclared]
  123. // CHECK:STDOUT: %self: ref %ForwardDeclared = ref_binding self, %self.param
  124. // CHECK:STDOUT: }
  125. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  126. // CHECK:STDOUT: complete_type_witness = %complete_type
  127. // CHECK:STDOUT:
  128. // CHECK:STDOUT: !members:
  129. // CHECK:STDOUT: .Self = constants.%ForwardDeclared
  130. // CHECK:STDOUT: .F = %ForwardDeclared.F.decl
  131. // CHECK:STDOUT: .G = %ForwardDeclared.G.decl
  132. // CHECK:STDOUT: }
  133. // CHECK:STDOUT:
  134. // CHECK:STDOUT: class @Incomplete;
  135. // CHECK:STDOUT:
  136. // CHECK:STDOUT: fn @ForwardDeclared.F(%self.param: %ForwardDeclared);
  137. // CHECK:STDOUT:
  138. // CHECK:STDOUT: fn @ForwardDeclared.G(%self.param: %ForwardDeclared);
  139. // CHECK:STDOUT:
  140. // CHECK:STDOUT: --- b.carbon
  141. // CHECK:STDOUT:
  142. // CHECK:STDOUT: constants {
  143. // CHECK:STDOUT: %Run.type: type = fn_type @Run [concrete]
  144. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  145. // CHECK:STDOUT: %Run: %Run.type = struct_value () [concrete]
  146. // CHECK:STDOUT: %Empty: type = class_type @Empty [concrete]
  147. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  148. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  149. // CHECK:STDOUT: %pattern_type.2f0: type = pattern_type %Empty [concrete]
  150. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  151. // CHECK:STDOUT: %Empty.val: %Empty = struct_value () [concrete]
  152. // CHECK:STDOUT: %Field: type = class_type @Field [concrete]
  153. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  154. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  155. // CHECK:STDOUT: %struct_type.x.767: type = struct_type {.x: %i32} [concrete]
  156. // CHECK:STDOUT: %complete_type.c07: <witness> = complete_type_witness %struct_type.x.767 [concrete]
  157. // CHECK:STDOUT: %pattern_type.f46: type = pattern_type %Field [concrete]
  158. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  159. // CHECK:STDOUT: %struct_type.x.c96: type = struct_type {.x: Core.IntLiteral} [concrete]
  160. // CHECK:STDOUT: %struct: %struct_type.x.c96 = struct_value (%int_1.5b8) [concrete]
  161. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  162. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  163. // CHECK:STDOUT: %ImplicitAs.type.bd9: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  164. // CHECK:STDOUT: %ImplicitAs.Convert.type.6da: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  165. // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
  166. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.365: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
  167. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.8cf: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.365 = struct_value () [symbolic]
  168. // CHECK:STDOUT: %ImplicitAs.impl_witness.09b: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.04e, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  169. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.069: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  170. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.13e: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.069 = struct_value () [concrete]
  171. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.bd9 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.09b) [concrete]
  172. // CHECK:STDOUT: %.1a5: type = fn_type_with_self_type %ImplicitAs.Convert.type.6da, %ImplicitAs.facet [concrete]
  173. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b66: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.13e [concrete]
  174. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.13e, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  175. // CHECK:STDOUT: %bound_method.c7c: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  176. // CHECK:STDOUT: %int_1.47b: %i32 = int_value 1 [concrete]
  177. // CHECK:STDOUT: %Field.val: %Field = struct_value (%int_1.47b) [concrete]
  178. // CHECK:STDOUT: %Field.elem: type = unbound_element_type %Field, %i32 [concrete]
  179. // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete]
  180. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8e7: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.13e [concrete]
  181. // CHECK:STDOUT: %bound_method.a94: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  182. // CHECK:STDOUT: %int_2.d0d: %i32 = int_value 2 [concrete]
  183. // CHECK:STDOUT: %ForwardDeclared.7b34f2.1: type = class_type @ForwardDeclared.1 [concrete]
  184. // CHECK:STDOUT: %pattern_type.1b8: type = pattern_type %ForwardDeclared.7b34f2.1 [concrete]
  185. // CHECK:STDOUT: %ForwardDeclared.val: %ForwardDeclared.7b34f2.1 = struct_value () [concrete]
  186. // CHECK:STDOUT: %ForwardDeclared.F.type: type = fn_type @ForwardDeclared.F [concrete]
  187. // CHECK:STDOUT: %ForwardDeclared.F: %ForwardDeclared.F.type = struct_value () [concrete]
  188. // CHECK:STDOUT: %ForwardDeclared.G.type: type = fn_type @ForwardDeclared.G [concrete]
  189. // CHECK:STDOUT: %ForwardDeclared.G: %ForwardDeclared.G.type = struct_value () [concrete]
  190. // CHECK:STDOUT: %ptr.6cf: type = ptr_type %ForwardDeclared.7b34f2.1 [concrete]
  191. // CHECK:STDOUT: %pattern_type.ebb: type = pattern_type %ptr.6cf [concrete]
  192. // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
  193. // CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete]
  194. // CHECK:STDOUT: %T.d9f: type = symbolic_binding T, 0 [symbolic]
  195. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.75b: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.d9f) [symbolic]
  196. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.692: %ptr.as.Copy.impl.Op.type.75b = struct_value () [symbolic]
  197. // CHECK:STDOUT: %Copy.impl_witness.bf8: <witness> = impl_witness imports.%Copy.impl_witness_table.67d, @ptr.as.Copy.impl(%ForwardDeclared.7b34f2.1) [concrete]
  198. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.b63: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%ForwardDeclared.7b34f2.1) [concrete]
  199. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.8de: %ptr.as.Copy.impl.Op.type.b63 = struct_value () [concrete]
  200. // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.6cf, (%Copy.impl_witness.bf8) [concrete]
  201. // CHECK:STDOUT: %.05a: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete]
  202. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %ptr.as.Copy.impl.Op.8de, @ptr.as.Copy.impl.Op(%ForwardDeclared.7b34f2.1) [concrete]
  203. // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [concrete]
  204. // CHECK:STDOUT: %ptr.c62: type = ptr_type %Incomplete [concrete]
  205. // CHECK:STDOUT: %pattern_type.275: type = pattern_type %ptr.c62 [concrete]
  206. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  207. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
  208. // CHECK:STDOUT: %facet_value.a09: %type_where = facet_value %ptr.c62, () [concrete]
  209. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.257: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.a09) [concrete]
  210. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.6fd: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.257 = struct_value () [concrete]
  211. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.cdc: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.6fd, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.a09) [concrete]
  212. // CHECK:STDOUT: %facet_value.481: %type_where = facet_value %ptr.6cf, () [concrete]
  213. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.6eb: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.481) [concrete]
  214. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.610: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.6eb = struct_value () [concrete]
  215. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.250: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.610, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.481) [concrete]
  216. // CHECK:STDOUT: %facet_value.c58: %type_where = facet_value %ForwardDeclared.7b34f2.1, () [concrete]
  217. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.d7f: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.c58) [concrete]
  218. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.e9e: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.d7f = struct_value () [concrete]
  219. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.cf0: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.e9e, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.c58) [concrete]
  220. // CHECK:STDOUT: %facet_value.f6b: %type_where = facet_value %Field, () [concrete]
  221. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.b06: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.f6b) [concrete]
  222. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.088: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.b06 = struct_value () [concrete]
  223. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.0a0: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.088, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.f6b) [concrete]
  224. // CHECK:STDOUT: %facet_value.8d3: %type_where = facet_value %Empty, () [concrete]
  225. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.3f6: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.8d3) [concrete]
  226. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.a12: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.3f6 = struct_value () [concrete]
  227. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.af0: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.a12, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.8d3) [concrete]
  228. // CHECK:STDOUT: }
  229. // CHECK:STDOUT:
  230. // CHECK:STDOUT: imports {
  231. // CHECK:STDOUT: %Main.Empty: type = import_ref Main//a, Empty, loaded [concrete = constants.%Empty]
  232. // CHECK:STDOUT: %Main.Field: type = import_ref Main//a, Field, loaded [concrete = constants.%Field]
  233. // CHECK:STDOUT: %Main.ForwardDeclared: type = import_ref Main//a, ForwardDeclared, loaded [concrete = constants.%ForwardDeclared.7b34f2.1]
  234. // CHECK:STDOUT: %Main.Incomplete: type = import_ref Main//a, Incomplete, loaded [concrete = constants.%Incomplete]
  235. // CHECK:STDOUT: %Core.ece: <namespace> = namespace file.%Core.import, [concrete] {
  236. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  237. // CHECK:STDOUT: .Copy = %Core.Copy
  238. // CHECK:STDOUT: .Destroy = %Core.Destroy
  239. // CHECK:STDOUT: import Core//prelude
  240. // CHECK:STDOUT: import Core//prelude/...
  241. // CHECK:STDOUT: }
  242. // CHECK:STDOUT: %Main.import_ref.8f24d3.1: <witness> = import_ref Main//a, loc5_1, loaded [concrete = constants.%complete_type.357]
  243. // CHECK:STDOUT: %Main.import_ref.fd7 = import_ref Main//a, inst{{[0-9A-F]+}} [no loc], unloaded
  244. // CHECK:STDOUT: %Main.import_ref.709: <witness> = import_ref Main//a, loc9_1, loaded [concrete = constants.%complete_type.c07]
  245. // CHECK:STDOUT: %Main.import_ref.845 = import_ref Main//a, inst{{[0-9A-F]+}} [no loc], unloaded
  246. // CHECK:STDOUT: %Main.import_ref.4d2: %Field.elem = import_ref Main//a, loc8_8, loaded [concrete = %.d33]
  247. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  248. // CHECK:STDOUT: %Core.import_ref.7d5: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.365) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.8cf)]
  249. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.04e = impl_witness_table (%Core.import_ref.7d5), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  250. // CHECK:STDOUT: %.d33: %Field.elem = field_decl x, element0 [concrete]
  251. // CHECK:STDOUT: %Main.import_ref.8f24d3.2: <witness> = import_ref Main//a, loc16_1, loaded [concrete = constants.%complete_type.357]
  252. // CHECK:STDOUT: %Main.import_ref.39e731.1 = import_ref Main//a, inst{{[0-9A-F]+}} [no loc], unloaded
  253. // CHECK:STDOUT: %Main.import_ref.760: %ForwardDeclared.F.type = import_ref Main//a, loc14_21, loaded [concrete = constants.%ForwardDeclared.F]
  254. // CHECK:STDOUT: %Main.import_ref.26e: %ForwardDeclared.G.type = import_ref Main//a, loc15_25, loaded [concrete = constants.%ForwardDeclared.G]
  255. // CHECK:STDOUT: %Main.import_ref.8f24d3.3: <witness> = import_ref Main//a, loc16_1, loaded [concrete = constants.%complete_type.357]
  256. // CHECK:STDOUT: %Main.import_ref.39e731.2 = import_ref Main//a, inst{{[0-9A-F]+}} [no loc], unloaded
  257. // CHECK:STDOUT: %Main.import_ref.42a = import_ref Main//a, loc14_21, unloaded
  258. // CHECK:STDOUT: %Main.import_ref.67a = import_ref Main//a, loc15_25, unloaded
  259. // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type]
  260. // CHECK:STDOUT: %Core.import_ref.659: @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op.type (%ptr.as.Copy.impl.Op.type.75b) = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op (constants.%ptr.as.Copy.impl.Op.692)]
  261. // CHECK:STDOUT: %Copy.impl_witness_table.67d = impl_witness_table (%Core.import_ref.659), @ptr.as.Copy.impl [concrete]
  262. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  263. // CHECK:STDOUT: }
  264. // CHECK:STDOUT:
  265. // CHECK:STDOUT: file {
  266. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  267. // CHECK:STDOUT: .Empty = imports.%Main.Empty
  268. // CHECK:STDOUT: .Field = imports.%Main.Field
  269. // CHECK:STDOUT: .ForwardDeclared = imports.%Main.ForwardDeclared
  270. // CHECK:STDOUT: .Incomplete = imports.%Main.Incomplete
  271. // CHECK:STDOUT: .Core = imports.%Core.ece
  272. // CHECK:STDOUT: .Run = %Run.decl
  273. // CHECK:STDOUT: }
  274. // CHECK:STDOUT: %Core.import = import Core
  275. // CHECK:STDOUT: %default.import = import <none>
  276. // CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [concrete = constants.%Run] {} {}
  277. // CHECK:STDOUT: }
  278. // CHECK:STDOUT:
  279. // CHECK:STDOUT: class @Empty [from "a.carbon"] {
  280. // CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f24d3.1
  281. // CHECK:STDOUT:
  282. // CHECK:STDOUT: !members:
  283. // CHECK:STDOUT: .Self = imports.%Main.import_ref.fd7
  284. // CHECK:STDOUT: }
  285. // CHECK:STDOUT:
  286. // CHECK:STDOUT: class @Field [from "a.carbon"] {
  287. // CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.709
  288. // CHECK:STDOUT:
  289. // CHECK:STDOUT: !members:
  290. // CHECK:STDOUT: .Self = imports.%Main.import_ref.845
  291. // CHECK:STDOUT: .x = imports.%Main.import_ref.4d2
  292. // CHECK:STDOUT: }
  293. // CHECK:STDOUT:
  294. // CHECK:STDOUT: class @ForwardDeclared.1 [from "a.carbon"] {
  295. // CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f24d3.2
  296. // CHECK:STDOUT:
  297. // CHECK:STDOUT: !members:
  298. // CHECK:STDOUT: .Self = imports.%Main.import_ref.39e731.1
  299. // CHECK:STDOUT: .F = imports.%Main.import_ref.760
  300. // CHECK:STDOUT: .G = imports.%Main.import_ref.26e
  301. // CHECK:STDOUT: }
  302. // CHECK:STDOUT:
  303. // CHECK:STDOUT: class @ForwardDeclared.2 [from "a.carbon"] {
  304. // CHECK:STDOUT: complete_type_witness = imports.%Main.import_ref.8f24d3.3
  305. // CHECK:STDOUT:
  306. // CHECK:STDOUT: !members:
  307. // CHECK:STDOUT: .Self = imports.%Main.import_ref.39e731.2
  308. // CHECK:STDOUT: .F = imports.%Main.import_ref.42a
  309. // CHECK:STDOUT: .G = imports.%Main.import_ref.67a
  310. // CHECK:STDOUT: }
  311. // CHECK:STDOUT:
  312. // CHECK:STDOUT: class @Incomplete [from "a.carbon"];
  313. // CHECK:STDOUT:
  314. // CHECK:STDOUT: fn @Run() {
  315. // CHECK:STDOUT: !entry:
  316. // CHECK:STDOUT: name_binding_decl {
  317. // CHECK:STDOUT: %a.patt: %pattern_type.2f0 = ref_binding_pattern a [concrete]
  318. // CHECK:STDOUT: %a.var_patt: %pattern_type.2f0 = var_pattern %a.patt [concrete]
  319. // CHECK:STDOUT: }
  320. // CHECK:STDOUT: %a.var: ref %Empty = var %a.var_patt
  321. // CHECK:STDOUT: %.loc7_19.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  322. // CHECK:STDOUT: %.loc7_19.2: init %Empty = class_init (), %a.var [concrete = constants.%Empty.val]
  323. // CHECK:STDOUT: %.loc7_3: init %Empty = converted %.loc7_19.1, %.loc7_19.2 [concrete = constants.%Empty.val]
  324. // CHECK:STDOUT: assign %a.var, %.loc7_3
  325. // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, imports.%Main.Empty [concrete = constants.%Empty]
  326. // CHECK:STDOUT: %a: ref %Empty = ref_binding a, %a.var
  327. // CHECK:STDOUT: name_binding_decl {
  328. // CHECK:STDOUT: %b.patt: %pattern_type.f46 = ref_binding_pattern b [concrete]
  329. // CHECK:STDOUT: %b.var_patt: %pattern_type.f46 = var_pattern %b.patt [concrete]
  330. // CHECK:STDOUT: }
  331. // CHECK:STDOUT: %b.var: ref %Field = var %b.var_patt
  332. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  333. // CHECK:STDOUT: %.loc9_25.1: %struct_type.x.c96 = struct_literal (%int_1) [concrete = constants.%struct]
  334. // CHECK:STDOUT: %impl.elem0.loc9: %.1a5 = impl_witness_access constants.%ImplicitAs.impl_witness.09b, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.13e]
  335. // CHECK:STDOUT: %bound_method.loc9_25.1: <bound method> = bound_method %int_1, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b66]
  336. // CHECK:STDOUT: %specific_fn.loc9: <specific function> = specific_function %impl.elem0.loc9, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  337. // CHECK:STDOUT: %bound_method.loc9_25.2: <bound method> = bound_method %int_1, %specific_fn.loc9 [concrete = constants.%bound_method.c7c]
  338. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %i32 = call %bound_method.loc9_25.2(%int_1) [concrete = constants.%int_1.47b]
  339. // CHECK:STDOUT: %.loc9_25.2: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.47b]
  340. // CHECK:STDOUT: %.loc9_25.3: ref %i32 = class_element_access %b.var, element0
  341. // CHECK:STDOUT: %.loc9_25.4: init %i32 = initialize_from %.loc9_25.2 to %.loc9_25.3 [concrete = constants.%int_1.47b]
  342. // CHECK:STDOUT: %.loc9_25.5: init %Field = class_init (%.loc9_25.4), %b.var [concrete = constants.%Field.val]
  343. // CHECK:STDOUT: %.loc9_3: init %Field = converted %.loc9_25.1, %.loc9_25.5 [concrete = constants.%Field.val]
  344. // CHECK:STDOUT: assign %b.var, %.loc9_3
  345. // CHECK:STDOUT: %Field.ref: type = name_ref Field, imports.%Main.Field [concrete = constants.%Field]
  346. // CHECK:STDOUT: %b: ref %Field = ref_binding b, %b.var
  347. // CHECK:STDOUT: %b.ref: ref %Field = name_ref b, %b
  348. // CHECK:STDOUT: %x.ref: %Field.elem = name_ref x, imports.%Main.import_ref.4d2 [concrete = imports.%.d33]
  349. // CHECK:STDOUT: %.loc10_4: ref %i32 = class_element_access %b.ref, element0
  350. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  351. // CHECK:STDOUT: %impl.elem0.loc10: %.1a5 = impl_witness_access constants.%ImplicitAs.impl_witness.09b, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.13e]
  352. // CHECK:STDOUT: %bound_method.loc10_7.1: <bound method> = bound_method %int_2, %impl.elem0.loc10 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8e7]
  353. // CHECK:STDOUT: %specific_fn.loc10: <specific function> = specific_function %impl.elem0.loc10, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  354. // CHECK:STDOUT: %bound_method.loc10_7.2: <bound method> = bound_method %int_2, %specific_fn.loc10 [concrete = constants.%bound_method.a94]
  355. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10: init %i32 = call %bound_method.loc10_7.2(%int_2) [concrete = constants.%int_2.d0d]
  356. // CHECK:STDOUT: %.loc10_7: init %i32 = converted %int_2, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10 [concrete = constants.%int_2.d0d]
  357. // CHECK:STDOUT: assign %.loc10_4, %.loc10_7
  358. // CHECK:STDOUT: name_binding_decl {
  359. // CHECK:STDOUT: %c.patt: %pattern_type.1b8 = ref_binding_pattern c [concrete]
  360. // CHECK:STDOUT: %c.var_patt: %pattern_type.1b8 = var_pattern %c.patt [concrete]
  361. // CHECK:STDOUT: }
  362. // CHECK:STDOUT: %c.var: ref %ForwardDeclared.7b34f2.1 = var %c.var_patt
  363. // CHECK:STDOUT: %.loc12_29.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  364. // CHECK:STDOUT: %.loc12_29.2: init %ForwardDeclared.7b34f2.1 = class_init (), %c.var [concrete = constants.%ForwardDeclared.val]
  365. // CHECK:STDOUT: %.loc12_3: init %ForwardDeclared.7b34f2.1 = converted %.loc12_29.1, %.loc12_29.2 [concrete = constants.%ForwardDeclared.val]
  366. // CHECK:STDOUT: assign %c.var, %.loc12_3
  367. // CHECK:STDOUT: %ForwardDeclared.ref.loc12: type = name_ref ForwardDeclared, imports.%Main.ForwardDeclared [concrete = constants.%ForwardDeclared.7b34f2.1]
  368. // CHECK:STDOUT: %c: ref %ForwardDeclared.7b34f2.1 = ref_binding c, %c.var
  369. // CHECK:STDOUT: %c.ref.loc13: ref %ForwardDeclared.7b34f2.1 = name_ref c, %c
  370. // CHECK:STDOUT: %F.ref: %ForwardDeclared.F.type = name_ref F, imports.%Main.import_ref.760 [concrete = constants.%ForwardDeclared.F]
  371. // CHECK:STDOUT: %ForwardDeclared.F.bound: <bound method> = bound_method %c.ref.loc13, %F.ref
  372. // CHECK:STDOUT: %.loc13: %ForwardDeclared.7b34f2.1 = acquire_value %c.ref.loc13
  373. // CHECK:STDOUT: %ForwardDeclared.F.call: init %empty_tuple.type = call %ForwardDeclared.F.bound(%.loc13)
  374. // CHECK:STDOUT: %c.ref.loc14: ref %ForwardDeclared.7b34f2.1 = name_ref c, %c
  375. // CHECK:STDOUT: %G.ref: %ForwardDeclared.G.type = name_ref G, imports.%Main.import_ref.26e [concrete = constants.%ForwardDeclared.G]
  376. // CHECK:STDOUT: %ForwardDeclared.G.bound: <bound method> = bound_method %c.ref.loc14, %G.ref
  377. // CHECK:STDOUT: %ForwardDeclared.G.call: init %empty_tuple.type = call %ForwardDeclared.G.bound(%c.ref.loc14)
  378. // CHECK:STDOUT: name_binding_decl {
  379. // CHECK:STDOUT: %d.patt: %pattern_type.ebb = ref_binding_pattern d [concrete]
  380. // CHECK:STDOUT: %d.var_patt: %pattern_type.ebb = var_pattern %d.patt [concrete]
  381. // CHECK:STDOUT: }
  382. // CHECK:STDOUT: %d.var: ref %ptr.6cf = var %d.var_patt
  383. // CHECK:STDOUT: %c.ref.loc16: ref %ForwardDeclared.7b34f2.1 = name_ref c, %c
  384. // CHECK:STDOUT: %addr: %ptr.6cf = addr_of %c.ref.loc16
  385. // CHECK:STDOUT: %impl.elem0.loc16: %.05a = impl_witness_access constants.%Copy.impl_witness.bf8, element0 [concrete = constants.%ptr.as.Copy.impl.Op.8de]
  386. // CHECK:STDOUT: %bound_method.loc16_29.1: <bound method> = bound_method %addr, %impl.elem0.loc16
  387. // CHECK:STDOUT: %specific_fn.loc16: <specific function> = specific_function %impl.elem0.loc16, @ptr.as.Copy.impl.Op(constants.%ForwardDeclared.7b34f2.1) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn]
  388. // CHECK:STDOUT: %bound_method.loc16_29.2: <bound method> = bound_method %addr, %specific_fn.loc16
  389. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.call: init %ptr.6cf = call %bound_method.loc16_29.2(%addr)
  390. // CHECK:STDOUT: assign %d.var, %ptr.as.Copy.impl.Op.call
  391. // CHECK:STDOUT: %.loc16: type = splice_block %ptr.loc16 [concrete = constants.%ptr.6cf] {
  392. // CHECK:STDOUT: %ForwardDeclared.ref.loc16: type = name_ref ForwardDeclared, imports.%Main.ForwardDeclared [concrete = constants.%ForwardDeclared.7b34f2.1]
  393. // CHECK:STDOUT: %ptr.loc16: type = ptr_type %ForwardDeclared.ref.loc16 [concrete = constants.%ptr.6cf]
  394. // CHECK:STDOUT: }
  395. // CHECK:STDOUT: %d: ref %ptr.6cf = ref_binding d, %d.var
  396. // CHECK:STDOUT: name_binding_decl {
  397. // CHECK:STDOUT: %e.patt: %pattern_type.275 = ref_binding_pattern e [concrete]
  398. // CHECK:STDOUT: %e.var_patt: %pattern_type.275 = var_pattern %e.patt [concrete]
  399. // CHECK:STDOUT: }
  400. // CHECK:STDOUT: %e.var: ref %ptr.c62 = var %e.var_patt
  401. // CHECK:STDOUT: %.loc18: type = splice_block %ptr.loc18 [concrete = constants.%ptr.c62] {
  402. // CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, imports.%Main.Incomplete [concrete = constants.%Incomplete]
  403. // CHECK:STDOUT: %ptr.loc18: type = ptr_type %Incomplete.ref [concrete = constants.%ptr.c62]
  404. // CHECK:STDOUT: }
  405. // CHECK:STDOUT: %e: ref %ptr.c62 = ref_binding e, %e.var
  406. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc18: <bound method> = bound_method %e.var, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.6fd
  407. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.6fd, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.a09) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.cdc]
  408. // CHECK:STDOUT: %bound_method.loc18: <bound method> = bound_method %e.var, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1
  409. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc18: init %empty_tuple.type = call %bound_method.loc18(%e.var)
  410. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc16: <bound method> = bound_method %d.var, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.610
  411. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.2: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.610, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.481) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.250]
  412. // CHECK:STDOUT: %bound_method.loc16_3: <bound method> = bound_method %d.var, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.2
  413. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc16: init %empty_tuple.type = call %bound_method.loc16_3(%d.var)
  414. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc12: <bound method> = bound_method %c.var, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.e9e
  415. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.3: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.e9e, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.c58) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.cf0]
  416. // CHECK:STDOUT: %bound_method.loc12: <bound method> = bound_method %c.var, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.3
  417. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc12: init %empty_tuple.type = call %bound_method.loc12(%c.var)
  418. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc9: <bound method> = bound_method %b.var, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.088
  419. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.4: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.088, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.f6b) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.0a0]
  420. // CHECK:STDOUT: %bound_method.loc9_3: <bound method> = bound_method %b.var, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.4
  421. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9_3(%b.var)
  422. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc7: <bound method> = bound_method %a.var, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.a12
  423. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.5: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.a12, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.8d3) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.af0]
  424. // CHECK:STDOUT: %bound_method.loc7: <bound method> = bound_method %a.var, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.5
  425. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc7: init %empty_tuple.type = call %bound_method.loc7(%a.var)
  426. // CHECK:STDOUT: return
  427. // CHECK:STDOUT: }
  428. // CHECK:STDOUT:
  429. // CHECK:STDOUT: fn @ForwardDeclared.F [from "a.carbon"];
  430. // CHECK:STDOUT:
  431. // CHECK:STDOUT: fn @ForwardDeclared.G [from "a.carbon"];
  432. // CHECK:STDOUT: