default_arg.carbon 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761
  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. // EXTRA-ARGS: --clang-arg=--std=c++23
  7. //
  8. // AUTOUPDATE
  9. // TIP: To test this file alone, run:
  10. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interop/cpp/function/default_arg.carbon
  11. // TIP: To dump output, run:
  12. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interop/cpp/function/default_arg.carbon
  13. // --- functions.h
  14. void A(int a, int b, int c = 1, int d = 2);
  15. struct X {
  16. void B(int a, int b = 1);
  17. static void C(int a, int b = 1);
  18. void D(this X, int a, int b = 1);
  19. };
  20. // --- call_without_default.carbon
  21. library "[[@TEST_NAME]]";
  22. import Cpp library "functions.h";
  23. fn Call() {
  24. //@dump-sem-ir-begin
  25. Cpp.A(1, 2, 3, 4);
  26. ({} as Cpp.X).B(1, 2);
  27. Cpp.X.C(1, 2);
  28. ({} as Cpp.X).D(1, 2);
  29. //@dump-sem-ir-end
  30. }
  31. // --- call_with_default.carbon
  32. //@include-in-dumps
  33. library "[[@TEST_NAME]]";
  34. import Cpp library "functions.h";
  35. fn Call() {
  36. // //@dump-sem-ir-begin
  37. Cpp.A(1, 2);
  38. Cpp.A(1, 2, 3);
  39. ({} as Cpp.X).B(1);
  40. Cpp.X.C(1);
  41. ({} as Cpp.X).D(1);
  42. // //@dump-sem-ir-end
  43. }
  44. // --- fail_call_too_few_args.carbon
  45. library "[[@TEST_NAME]]";
  46. import Cpp library "functions.h";
  47. fn Call() {
  48. //@dump-sem-ir-begin
  49. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+8]]:10: error: no matching function for call to 'A' [CppInteropParseError]
  50. // CHECK:STDERR: 16 | Cpp.A(1);
  51. // CHECK:STDERR: | ^
  52. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE-7]]:10: in file included here [InCppInclude]
  53. // CHECK:STDERR: ./functions.h:2:6: note: candidate function not viable: requires at least 2 arguments, but 1 was provided [CppInteropParseNote]
  54. // CHECK:STDERR: 2 | void A(int a, int b, int c = 1, int d = 2);
  55. // CHECK:STDERR: | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  56. // CHECK:STDERR:
  57. Cpp.A(1);
  58. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+8]]:9: error: no matching function for call to 'A' [CppInteropParseError]
  59. // CHECK:STDERR: 26 | Cpp.A();
  60. // CHECK:STDERR: | ^
  61. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE-17]]:10: in file included here [InCppInclude]
  62. // CHECK:STDERR: ./functions.h:2:6: note: candidate function not viable: requires at least 2 arguments, but 0 were provided [CppInteropParseNote]
  63. // CHECK:STDERR: 2 | void A(int a, int b, int c = 1, int d = 2);
  64. // CHECK:STDERR: | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  65. // CHECK:STDERR:
  66. Cpp.A();
  67. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+8]]:19: error: no matching function for call to 'B' [CppInteropParseError]
  68. // CHECK:STDERR: 36 | ({} as Cpp.X).B();
  69. // CHECK:STDERR: | ^
  70. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE-27]]:10: in file included here [InCppInclude]
  71. // CHECK:STDERR: ./functions.h:5:8: note: candidate function not viable: requires at least argument 'a', but no arguments were provided [CppInteropParseNote]
  72. // CHECK:STDERR: 5 | void B(int a, int b = 1);
  73. // CHECK:STDERR: | ^ ~~~~~~~~~~~~~~~~
  74. // CHECK:STDERR:
  75. ({} as Cpp.X).B();
  76. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+8]]:11: error: no matching function for call to 'C' [CppInteropParseError]
  77. // CHECK:STDERR: 46 | Cpp.X.C();
  78. // CHECK:STDERR: | ^
  79. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE-37]]:10: in file included here [InCppInclude]
  80. // CHECK:STDERR: ./functions.h:6:15: note: candidate function not viable: requires at least argument 'a', but no arguments were provided [CppInteropParseNote]
  81. // CHECK:STDERR: 6 | static void C(int a, int b = 1);
  82. // CHECK:STDERR: | ^ ~~~~~~~~~~~~~~~~
  83. // CHECK:STDERR:
  84. Cpp.X.C();
  85. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE+8]]:19: error: no matching function for call to 'D' [CppInteropParseError]
  86. // CHECK:STDERR: 56 | ({} as Cpp.X).D();
  87. // CHECK:STDERR: | ^
  88. // CHECK:STDERR: fail_call_too_few_args.carbon:[[@LINE-47]]:10: in file included here [InCppInclude]
  89. // CHECK:STDERR: ./functions.h:7:8: note: candidate function not viable: requires at least non-object argument 'a', but no arguments were provided [CppInteropParseNote]
  90. // CHECK:STDERR: 7 | void D(this X, int a, int b = 1);
  91. // CHECK:STDERR: | ^ ~~~~~~~~~~~~~~~~~~~~~~~~
  92. // CHECK:STDERR:
  93. ({} as Cpp.X).D();
  94. //@dump-sem-ir-end
  95. }
  96. // CHECK:STDOUT: --- call_without_default.carbon
  97. // CHECK:STDOUT:
  98. // CHECK:STDOUT: constants {
  99. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  100. // CHECK:STDOUT: %.490: type = cpp_overload_set_type @Int.as.ImplicitAs.impl.Convert [concrete]
  101. // CHECK:STDOUT: %empty_struct.a89: %.490 = struct_value () [concrete]
  102. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  103. // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete]
  104. // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete]
  105. // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete]
  106. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  107. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  108. // CHECK:STDOUT: %A.type: type = fn_type @A [concrete]
  109. // CHECK:STDOUT: %A: %A.type = struct_value () [concrete]
  110. // CHECK:STDOUT: %ImplicitAs.type.d14: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  111. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  112. // CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
  113. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.340: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
  114. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.1c0: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.340 = struct_value () [symbolic]
  115. // CHECK:STDOUT: %ImplicitAs.impl_witness.204: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.9e9, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  116. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.584: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  117. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.584 = struct_value () [concrete]
  118. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.d14 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.204) [concrete]
  119. // CHECK:STDOUT: %.1df: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete]
  120. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.abf: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  121. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  122. // CHECK:STDOUT: %bound_method.c11: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  123. // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete]
  124. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b82: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  125. // CHECK:STDOUT: %bound_method.8bd: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  126. // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete]
  127. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.595: <bound method> = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  128. // CHECK:STDOUT: %bound_method.f36: <bound method> = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  129. // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete]
  130. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.5bb: <bound method> = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  131. // CHECK:STDOUT: %bound_method.9cd: <bound method> = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  132. // CHECK:STDOUT: %int_4.940: %i32 = int_value 4 [concrete]
  133. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  134. // CHECK:STDOUT: %X: type = class_type @X [concrete]
  135. // CHECK:STDOUT: %X.val: %X = struct_value () [concrete]
  136. // CHECK:STDOUT: %.ed9: type = cpp_overload_set_type @X.B [concrete]
  137. // CHECK:STDOUT: %empty_struct.61d: %.ed9 = struct_value () [concrete]
  138. // CHECK:STDOUT: %ptr.1f9: type = ptr_type %X [concrete]
  139. // CHECK:STDOUT: %X.B.type: type = fn_type @X.B [concrete]
  140. // CHECK:STDOUT: %X.B: %X.B.type = struct_value () [concrete]
  141. // CHECK:STDOUT: %.ce5: type = cpp_overload_set_type @X.C [concrete]
  142. // CHECK:STDOUT: %empty_struct.a7d: %.ce5 = struct_value () [concrete]
  143. // CHECK:STDOUT: %X.C.type: type = fn_type @X.C [concrete]
  144. // CHECK:STDOUT: %X.C: %X.C.type = struct_value () [concrete]
  145. // CHECK:STDOUT: %.c13: type = cpp_overload_set_type @X.D [concrete]
  146. // CHECK:STDOUT: %empty_struct.576: %.c13 = struct_value () [concrete]
  147. // CHECK:STDOUT: %D__carbon_thunk.type: type = fn_type @D__carbon_thunk [concrete]
  148. // CHECK:STDOUT: %D__carbon_thunk: %D__carbon_thunk.type = struct_value () [concrete]
  149. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanAggregateDestroy>> [concrete]
  150. // CHECK:STDOUT: %facet_value: %type_where = facet_value %X, () [concrete]
  151. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.d91: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete]
  152. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.55b: %AggregateT.as_type.as.Destroy.impl.Op.type.d91 = struct_value () [concrete]
  153. // CHECK:STDOUT: }
  154. // CHECK:STDOUT:
  155. // CHECK:STDOUT: imports {
  156. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  157. // CHECK:STDOUT: .A = %.7c0
  158. // CHECK:STDOUT: .X = %X.decl
  159. // CHECK:STDOUT: import Cpp//...
  160. // CHECK:STDOUT: }
  161. // CHECK:STDOUT: %.7c0: %.490 = cpp_overload_set_value @Int.as.ImplicitAs.impl.Convert [concrete = constants.%empty_struct.a89]
  162. // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [concrete = constants.%A] {
  163. // CHECK:STDOUT: <elided>
  164. // CHECK:STDOUT: } {
  165. // CHECK:STDOUT: <elided>
  166. // CHECK:STDOUT: }
  167. // CHECK:STDOUT: %Core.import_ref.ee7: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.340) = import_ref Core//prelude/parts/int, loc23_39, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.1c0)]
  168. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.9e9 = impl_witness_table (%Core.import_ref.ee7), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  169. // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {}
  170. // CHECK:STDOUT: %.8ab: %.ed9 = cpp_overload_set_value @X.B [concrete = constants.%empty_struct.61d]
  171. // CHECK:STDOUT: %X.B.decl: %X.B.type = fn_decl @X.B [concrete = constants.%X.B] {
  172. // CHECK:STDOUT: <elided>
  173. // CHECK:STDOUT: } {
  174. // CHECK:STDOUT: <elided>
  175. // CHECK:STDOUT: }
  176. // CHECK:STDOUT: %.7af: %.ce5 = cpp_overload_set_value @X.C [concrete = constants.%empty_struct.a7d]
  177. // CHECK:STDOUT: %X.C.decl: %X.C.type = fn_decl @X.C [concrete = constants.%X.C] {
  178. // CHECK:STDOUT: <elided>
  179. // CHECK:STDOUT: } {
  180. // CHECK:STDOUT: <elided>
  181. // CHECK:STDOUT: }
  182. // CHECK:STDOUT: %.7b7: %.c13 = cpp_overload_set_value @X.D [concrete = constants.%empty_struct.576]
  183. // CHECK:STDOUT: %D__carbon_thunk.decl: %D__carbon_thunk.type = fn_decl @D__carbon_thunk [concrete = constants.%D__carbon_thunk] {
  184. // CHECK:STDOUT: <elided>
  185. // CHECK:STDOUT: } {
  186. // CHECK:STDOUT: <elided>
  187. // CHECK:STDOUT: }
  188. // CHECK:STDOUT: }
  189. // CHECK:STDOUT:
  190. // CHECK:STDOUT: fn @Call() {
  191. // CHECK:STDOUT: !entry:
  192. // CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  193. // CHECK:STDOUT: %A.ref: %.490 = name_ref A, imports.%.7c0 [concrete = constants.%empty_struct.a89]
  194. // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  195. // CHECK:STDOUT: %int_2.loc8: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  196. // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  197. // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1]
  198. // CHECK:STDOUT: %impl.elem0.loc8_9: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  199. // CHECK:STDOUT: %bound_method.loc8_9.1: <bound method> = bound_method %int_1.loc8, %impl.elem0.loc8_9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.abf]
  200. // CHECK:STDOUT: %specific_fn.loc8_9: <specific function> = specific_function %impl.elem0.loc8_9, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  201. // CHECK:STDOUT: %bound_method.loc8_9.2: <bound method> = bound_method %int_1.loc8, %specific_fn.loc8_9 [concrete = constants.%bound_method.c11]
  202. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_9: init %i32 = call %bound_method.loc8_9.2(%int_1.loc8) [concrete = constants.%int_1.5d2]
  203. // CHECK:STDOUT: %.loc8_9.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_9 [concrete = constants.%int_1.5d2]
  204. // CHECK:STDOUT: %.loc8_9.2: %i32 = converted %int_1.loc8, %.loc8_9.1 [concrete = constants.%int_1.5d2]
  205. // CHECK:STDOUT: %impl.elem0.loc8_12: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  206. // CHECK:STDOUT: %bound_method.loc8_12.1: <bound method> = bound_method %int_2.loc8, %impl.elem0.loc8_12 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b82]
  207. // CHECK:STDOUT: %specific_fn.loc8_12: <specific function> = specific_function %impl.elem0.loc8_12, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  208. // CHECK:STDOUT: %bound_method.loc8_12.2: <bound method> = bound_method %int_2.loc8, %specific_fn.loc8_12 [concrete = constants.%bound_method.8bd]
  209. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_12: init %i32 = call %bound_method.loc8_12.2(%int_2.loc8) [concrete = constants.%int_2.ef8]
  210. // CHECK:STDOUT: %.loc8_12.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_12 [concrete = constants.%int_2.ef8]
  211. // CHECK:STDOUT: %.loc8_12.2: %i32 = converted %int_2.loc8, %.loc8_12.1 [concrete = constants.%int_2.ef8]
  212. // CHECK:STDOUT: %impl.elem0.loc8_15: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  213. // CHECK:STDOUT: %bound_method.loc8_15.1: <bound method> = bound_method %int_3, %impl.elem0.loc8_15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.595]
  214. // CHECK:STDOUT: %specific_fn.loc8_15: <specific function> = specific_function %impl.elem0.loc8_15, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  215. // CHECK:STDOUT: %bound_method.loc8_15.2: <bound method> = bound_method %int_3, %specific_fn.loc8_15 [concrete = constants.%bound_method.f36]
  216. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_15: init %i32 = call %bound_method.loc8_15.2(%int_3) [concrete = constants.%int_3.822]
  217. // CHECK:STDOUT: %.loc8_15.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_15 [concrete = constants.%int_3.822]
  218. // CHECK:STDOUT: %.loc8_15.2: %i32 = converted %int_3, %.loc8_15.1 [concrete = constants.%int_3.822]
  219. // CHECK:STDOUT: %impl.elem0.loc8_18: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  220. // CHECK:STDOUT: %bound_method.loc8_18.1: <bound method> = bound_method %int_4, %impl.elem0.loc8_18 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.5bb]
  221. // CHECK:STDOUT: %specific_fn.loc8_18: <specific function> = specific_function %impl.elem0.loc8_18, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  222. // CHECK:STDOUT: %bound_method.loc8_18.2: <bound method> = bound_method %int_4, %specific_fn.loc8_18 [concrete = constants.%bound_method.9cd]
  223. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_18: init %i32 = call %bound_method.loc8_18.2(%int_4) [concrete = constants.%int_4.940]
  224. // CHECK:STDOUT: %.loc8_18.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_18 [concrete = constants.%int_4.940]
  225. // CHECK:STDOUT: %.loc8_18.2: %i32 = converted %int_4, %.loc8_18.1 [concrete = constants.%int_4.940]
  226. // CHECK:STDOUT: %A.call: init %empty_tuple.type = call imports.%A.decl(%.loc8_9.2, %.loc8_12.2, %.loc8_15.2, %.loc8_18.2)
  227. // CHECK:STDOUT: %.loc9_5.1: %empty_struct_type = struct_literal ()
  228. // CHECK:STDOUT: %Cpp.ref.loc9: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  229. // CHECK:STDOUT: %X.ref.loc9: type = name_ref X, imports.%X.decl [concrete = constants.%X]
  230. // CHECK:STDOUT: %.loc9_5.2: ref %X = temporary_storage
  231. // CHECK:STDOUT: %.loc9_5.3: init %X = class_init (), %.loc9_5.2 [concrete = constants.%X.val]
  232. // CHECK:STDOUT: %.loc9_5.4: ref %X = temporary %.loc9_5.2, %.loc9_5.3
  233. // CHECK:STDOUT: %.loc9_7: ref %X = converted %.loc9_5.1, %.loc9_5.4
  234. // CHECK:STDOUT: %B.ref: %.ed9 = name_ref B, imports.%.8ab [concrete = constants.%empty_struct.61d]
  235. // CHECK:STDOUT: %bound_method.loc9_16: <bound method> = bound_method %.loc9_7, %B.ref
  236. // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  237. // CHECK:STDOUT: %int_2.loc9: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  238. // CHECK:STDOUT: %addr.loc9_7: %ptr.1f9 = addr_of %.loc9_7
  239. // CHECK:STDOUT: %impl.elem0.loc9_19: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  240. // CHECK:STDOUT: %bound_method.loc9_19.1: <bound method> = bound_method %int_1.loc9, %impl.elem0.loc9_19 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.abf]
  241. // CHECK:STDOUT: %specific_fn.loc9_19: <specific function> = specific_function %impl.elem0.loc9_19, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  242. // CHECK:STDOUT: %bound_method.loc9_19.2: <bound method> = bound_method %int_1.loc9, %specific_fn.loc9_19 [concrete = constants.%bound_method.c11]
  243. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_19: init %i32 = call %bound_method.loc9_19.2(%int_1.loc9) [concrete = constants.%int_1.5d2]
  244. // CHECK:STDOUT: %.loc9_19.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_19 [concrete = constants.%int_1.5d2]
  245. // CHECK:STDOUT: %.loc9_19.2: %i32 = converted %int_1.loc9, %.loc9_19.1 [concrete = constants.%int_1.5d2]
  246. // CHECK:STDOUT: %impl.elem0.loc9_22: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  247. // CHECK:STDOUT: %bound_method.loc9_22.1: <bound method> = bound_method %int_2.loc9, %impl.elem0.loc9_22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b82]
  248. // CHECK:STDOUT: %specific_fn.loc9_22: <specific function> = specific_function %impl.elem0.loc9_22, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  249. // CHECK:STDOUT: %bound_method.loc9_22.2: <bound method> = bound_method %int_2.loc9, %specific_fn.loc9_22 [concrete = constants.%bound_method.8bd]
  250. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_22: init %i32 = call %bound_method.loc9_22.2(%int_2.loc9) [concrete = constants.%int_2.ef8]
  251. // CHECK:STDOUT: %.loc9_22.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_22 [concrete = constants.%int_2.ef8]
  252. // CHECK:STDOUT: %.loc9_22.2: %i32 = converted %int_2.loc9, %.loc9_22.1 [concrete = constants.%int_2.ef8]
  253. // CHECK:STDOUT: %X.B.call: init %empty_tuple.type = call imports.%X.B.decl(%addr.loc9_7, %.loc9_19.2, %.loc9_22.2)
  254. // CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  255. // CHECK:STDOUT: %X.ref.loc10: type = name_ref X, imports.%X.decl [concrete = constants.%X]
  256. // CHECK:STDOUT: %C.ref: %.ce5 = name_ref C, imports.%.7af [concrete = constants.%empty_struct.a7d]
  257. // CHECK:STDOUT: %int_1.loc10: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  258. // CHECK:STDOUT: %int_2.loc10: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  259. // CHECK:STDOUT: %impl.elem0.loc10_11: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  260. // CHECK:STDOUT: %bound_method.loc10_11.1: <bound method> = bound_method %int_1.loc10, %impl.elem0.loc10_11 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.abf]
  261. // CHECK:STDOUT: %specific_fn.loc10_11: <specific function> = specific_function %impl.elem0.loc10_11, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  262. // CHECK:STDOUT: %bound_method.loc10_11.2: <bound method> = bound_method %int_1.loc10, %specific_fn.loc10_11 [concrete = constants.%bound_method.c11]
  263. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_11: init %i32 = call %bound_method.loc10_11.2(%int_1.loc10) [concrete = constants.%int_1.5d2]
  264. // CHECK:STDOUT: %.loc10_11.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_11 [concrete = constants.%int_1.5d2]
  265. // CHECK:STDOUT: %.loc10_11.2: %i32 = converted %int_1.loc10, %.loc10_11.1 [concrete = constants.%int_1.5d2]
  266. // CHECK:STDOUT: %impl.elem0.loc10_14: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  267. // CHECK:STDOUT: %bound_method.loc10_14.1: <bound method> = bound_method %int_2.loc10, %impl.elem0.loc10_14 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b82]
  268. // CHECK:STDOUT: %specific_fn.loc10_14: <specific function> = specific_function %impl.elem0.loc10_14, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  269. // CHECK:STDOUT: %bound_method.loc10_14.2: <bound method> = bound_method %int_2.loc10, %specific_fn.loc10_14 [concrete = constants.%bound_method.8bd]
  270. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_14: init %i32 = call %bound_method.loc10_14.2(%int_2.loc10) [concrete = constants.%int_2.ef8]
  271. // CHECK:STDOUT: %.loc10_14.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_14 [concrete = constants.%int_2.ef8]
  272. // CHECK:STDOUT: %.loc10_14.2: %i32 = converted %int_2.loc10, %.loc10_14.1 [concrete = constants.%int_2.ef8]
  273. // CHECK:STDOUT: %X.C.call: init %empty_tuple.type = call imports.%X.C.decl(%.loc10_11.2, %.loc10_14.2)
  274. // CHECK:STDOUT: %.loc11_5.1: %empty_struct_type = struct_literal ()
  275. // CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  276. // CHECK:STDOUT: %X.ref.loc11: type = name_ref X, imports.%X.decl [concrete = constants.%X]
  277. // CHECK:STDOUT: %.loc11_5.2: ref %X = temporary_storage
  278. // CHECK:STDOUT: %.loc11_5.3: init %X = class_init (), %.loc11_5.2 [concrete = constants.%X.val]
  279. // CHECK:STDOUT: %.loc11_5.4: ref %X = temporary %.loc11_5.2, %.loc11_5.3
  280. // CHECK:STDOUT: %.loc11_7.1: ref %X = converted %.loc11_5.1, %.loc11_5.4
  281. // CHECK:STDOUT: %D.ref: %.c13 = name_ref D, imports.%.7b7 [concrete = constants.%empty_struct.576]
  282. // CHECK:STDOUT: %bound_method.loc11_16: <bound method> = bound_method %.loc11_7.1, %D.ref
  283. // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  284. // CHECK:STDOUT: %int_2.loc11: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  285. // CHECK:STDOUT: %.loc11_7.2: %X = bind_value %.loc11_7.1
  286. // CHECK:STDOUT: %impl.elem0.loc11_19: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  287. // CHECK:STDOUT: %bound_method.loc11_19.1: <bound method> = bound_method %int_1.loc11, %impl.elem0.loc11_19 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.abf]
  288. // CHECK:STDOUT: %specific_fn.loc11_19: <specific function> = specific_function %impl.elem0.loc11_19, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  289. // CHECK:STDOUT: %bound_method.loc11_19.2: <bound method> = bound_method %int_1.loc11, %specific_fn.loc11_19 [concrete = constants.%bound_method.c11]
  290. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_19: init %i32 = call %bound_method.loc11_19.2(%int_1.loc11) [concrete = constants.%int_1.5d2]
  291. // CHECK:STDOUT: %.loc11_19.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_19 [concrete = constants.%int_1.5d2]
  292. // CHECK:STDOUT: %.loc11_19.2: %i32 = converted %int_1.loc11, %.loc11_19.1 [concrete = constants.%int_1.5d2]
  293. // CHECK:STDOUT: %impl.elem0.loc11_22: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  294. // CHECK:STDOUT: %bound_method.loc11_22.1: <bound method> = bound_method %int_2.loc11, %impl.elem0.loc11_22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b82]
  295. // CHECK:STDOUT: %specific_fn.loc11_22: <specific function> = specific_function %impl.elem0.loc11_22, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  296. // CHECK:STDOUT: %bound_method.loc11_22.2: <bound method> = bound_method %int_2.loc11, %specific_fn.loc11_22 [concrete = constants.%bound_method.8bd]
  297. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_22: init %i32 = call %bound_method.loc11_22.2(%int_2.loc11) [concrete = constants.%int_2.ef8]
  298. // CHECK:STDOUT: %.loc11_22.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_22 [concrete = constants.%int_2.ef8]
  299. // CHECK:STDOUT: %.loc11_22.2: %i32 = converted %int_2.loc11, %.loc11_22.1 [concrete = constants.%int_2.ef8]
  300. // CHECK:STDOUT: %.loc11_7.3: ref %X = value_as_ref %.loc11_7.2
  301. // CHECK:STDOUT: %addr.loc11_23: %ptr.1f9 = addr_of %.loc11_7.3
  302. // CHECK:STDOUT: %D__carbon_thunk.call: init %empty_tuple.type = call imports.%D__carbon_thunk.decl(%addr.loc11_23, %.loc11_19.2, %.loc11_22.2)
  303. // CHECK:STDOUT: %facet_value.loc11: %type_where = facet_value constants.%X, () [concrete = constants.%facet_value]
  304. // CHECK:STDOUT: %.loc11_5.5: %type_where = converted constants.%X, %facet_value.loc11 [concrete = constants.%facet_value]
  305. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc11: <bound method> = bound_method %.loc11_5.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.55b
  306. // CHECK:STDOUT: <elided>
  307. // CHECK:STDOUT: %bound_method.loc11_5: <bound method> = bound_method %.loc11_5.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1
  308. // CHECK:STDOUT: %addr.loc11_5: %ptr.1f9 = addr_of %.loc11_5.4
  309. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc11: init %empty_tuple.type = call %bound_method.loc11_5(%addr.loc11_5)
  310. // CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%X, () [concrete = constants.%facet_value]
  311. // CHECK:STDOUT: %.loc9_5.5: %type_where = converted constants.%X, %facet_value.loc9 [concrete = constants.%facet_value]
  312. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: <bound method> = bound_method %.loc9_5.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.55b
  313. // CHECK:STDOUT: <elided>
  314. // CHECK:STDOUT: %bound_method.loc9_5: <bound method> = bound_method %.loc9_5.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2
  315. // CHECK:STDOUT: %addr.loc9_5: %ptr.1f9 = addr_of %.loc9_5.4
  316. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9_5(%addr.loc9_5)
  317. // CHECK:STDOUT: <elided>
  318. // CHECK:STDOUT: }
  319. // CHECK:STDOUT:
  320. // CHECK:STDOUT: --- call_with_default.carbon
  321. // CHECK:STDOUT:
  322. // CHECK:STDOUT: constants {
  323. // CHECK:STDOUT: %Call.type: type = fn_type @Call [concrete]
  324. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  325. // CHECK:STDOUT: %Call: %Call.type = struct_value () [concrete]
  326. // CHECK:STDOUT: %.490: type = cpp_overload_set_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete]
  327. // CHECK:STDOUT: %empty_struct.a89: %.490 = struct_value () [concrete]
  328. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  329. // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete]
  330. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  331. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  332. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  333. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  334. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  335. // CHECK:STDOUT: %A__carbon_thunk.type.f1e093.1: type = fn_type @A__carbon_thunk.1 [concrete]
  336. // CHECK:STDOUT: %A__carbon_thunk.8f654e.1: %A__carbon_thunk.type.f1e093.1 = struct_value () [concrete]
  337. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  338. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  339. // CHECK:STDOUT: %ImplicitAs.type.d14: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  340. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  341. // CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
  342. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.340: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
  343. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.1c0: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.340 = struct_value () [symbolic]
  344. // CHECK:STDOUT: %ImplicitAs.impl_witness.204: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.9e9, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  345. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.584: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  346. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.584 = struct_value () [concrete]
  347. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.d14 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.204) [concrete]
  348. // CHECK:STDOUT: %.1df: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete]
  349. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.abf: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  350. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  351. // CHECK:STDOUT: %bound_method.c11: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  352. // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete]
  353. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b82: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  354. // CHECK:STDOUT: %bound_method.8bd: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  355. // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete]
  356. // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete]
  357. // CHECK:STDOUT: %A__carbon_thunk.type.f1e093.2: type = fn_type @A__carbon_thunk.2 [concrete]
  358. // CHECK:STDOUT: %A__carbon_thunk.8f654e.2: %A__carbon_thunk.type.f1e093.2 = struct_value () [concrete]
  359. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.595: <bound method> = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  360. // CHECK:STDOUT: %bound_method.f36: <bound method> = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  361. // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete]
  362. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  363. // CHECK:STDOUT: %X: type = class_type @X [concrete]
  364. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  365. // CHECK:STDOUT: %X.val: %X = struct_value () [concrete]
  366. // CHECK:STDOUT: %.ed9: type = cpp_overload_set_type @Int.as.ImplicitAs.impl.Convert [concrete]
  367. // CHECK:STDOUT: %empty_struct.61d: %.ed9 = struct_value () [concrete]
  368. // CHECK:STDOUT: %ptr.1f9: type = ptr_type %X [concrete]
  369. // CHECK:STDOUT: %pattern_type.45c: type = pattern_type %ptr.1f9 [concrete]
  370. // CHECK:STDOUT: %B__carbon_thunk.type: type = fn_type @B__carbon_thunk [concrete]
  371. // CHECK:STDOUT: %B__carbon_thunk: %B__carbon_thunk.type = struct_value () [concrete]
  372. // CHECK:STDOUT: %.ce5: type = cpp_overload_set_type @A.2 [concrete]
  373. // CHECK:STDOUT: %empty_struct.a7d: %.ce5 = struct_value () [concrete]
  374. // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete]
  375. // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete]
  376. // CHECK:STDOUT: %.c13: type = cpp_overload_set_type @A__carbon_thunk.2 [concrete]
  377. // CHECK:STDOUT: %empty_struct.576: %.c13 = struct_value () [concrete]
  378. // CHECK:STDOUT: %D__carbon_thunk.type: type = fn_type @D__carbon_thunk [concrete]
  379. // CHECK:STDOUT: %D__carbon_thunk: %D__carbon_thunk.type = struct_value () [concrete]
  380. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  381. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanAggregateDestroy>> [concrete]
  382. // CHECK:STDOUT: %facet_value: %type_where = facet_value %X, () [concrete]
  383. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.d91: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete]
  384. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.55b: %AggregateT.as_type.as.Destroy.impl.Op.type.d91 = struct_value () [concrete]
  385. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %AggregateT.as_type.as.Destroy.impl.Op.55b, @AggregateT.as_type.as.Destroy.impl.Op(%facet_value) [concrete]
  386. // CHECK:STDOUT: }
  387. // CHECK:STDOUT:
  388. // CHECK:STDOUT: imports {
  389. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  390. // CHECK:STDOUT: .Int = %Core.Int
  391. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  392. // CHECK:STDOUT: .Destroy = %Core.Destroy
  393. // CHECK:STDOUT: import Core//prelude
  394. // CHECK:STDOUT: import Core//prelude/...
  395. // CHECK:STDOUT: }
  396. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  397. // CHECK:STDOUT: .A = %.7c0
  398. // CHECK:STDOUT: .X = %X.decl
  399. // CHECK:STDOUT: import Cpp//...
  400. // CHECK:STDOUT: }
  401. // CHECK:STDOUT: %.7c0: %.490 = cpp_overload_set_value @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete = constants.%empty_struct.a89]
  402. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
  403. // CHECK:STDOUT: %A__carbon_thunk.decl.713db8.1: %A__carbon_thunk.type.f1e093.1 = fn_decl @A__carbon_thunk.1 [concrete = constants.%A__carbon_thunk.8f654e.1] {
  404. // CHECK:STDOUT: %a.patt: %pattern_type.7ce = binding_pattern a [concrete]
  405. // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete]
  406. // CHECK:STDOUT: %b.patt: %pattern_type.7ce = binding_pattern b [concrete]
  407. // CHECK:STDOUT: %b.param_patt: %pattern_type.7ce = value_param_pattern %b.patt, call_param1 [concrete]
  408. // CHECK:STDOUT: } {
  409. // CHECK:STDOUT: %a.param: %i32 = value_param call_param0
  410. // CHECK:STDOUT: %.1: type = splice_block %i32.2 [concrete = constants.%i32] {
  411. // CHECK:STDOUT: %int_32.2: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  412. // CHECK:STDOUT: %i32.2: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  413. // CHECK:STDOUT: }
  414. // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
  415. // CHECK:STDOUT: %b.param: %i32 = value_param call_param1
  416. // CHECK:STDOUT: %.2: type = splice_block %i32.1 [concrete = constants.%i32] {
  417. // CHECK:STDOUT: %int_32.1: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  418. // CHECK:STDOUT: %i32.1: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  419. // CHECK:STDOUT: }
  420. // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param
  421. // CHECK:STDOUT: }
  422. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  423. // CHECK:STDOUT: %Core.import_ref.ee7: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.340) = import_ref Core//prelude/parts/int, loc23_39, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.1c0)]
  424. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.9e9 = impl_witness_table (%Core.import_ref.ee7), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  425. // CHECK:STDOUT: %A__carbon_thunk.decl.713db8.2: %A__carbon_thunk.type.f1e093.2 = fn_decl @A__carbon_thunk.2 [concrete = constants.%A__carbon_thunk.8f654e.2] {
  426. // CHECK:STDOUT: %a.patt: %pattern_type.7ce = binding_pattern a [concrete]
  427. // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete]
  428. // CHECK:STDOUT: %b.patt: %pattern_type.7ce = binding_pattern b [concrete]
  429. // CHECK:STDOUT: %b.param_patt: %pattern_type.7ce = value_param_pattern %b.patt, call_param1 [concrete]
  430. // CHECK:STDOUT: %c.patt: %pattern_type.7ce = binding_pattern c [concrete]
  431. // CHECK:STDOUT: %c.param_patt: %pattern_type.7ce = value_param_pattern %c.patt, call_param2 [concrete]
  432. // CHECK:STDOUT: } {
  433. // CHECK:STDOUT: %a.param: %i32 = value_param call_param0
  434. // CHECK:STDOUT: %.1: type = splice_block %i32.3 [concrete = constants.%i32] {
  435. // CHECK:STDOUT: %int_32.3: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  436. // CHECK:STDOUT: %i32.3: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  437. // CHECK:STDOUT: }
  438. // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
  439. // CHECK:STDOUT: %b.param: %i32 = value_param call_param1
  440. // CHECK:STDOUT: %.2: type = splice_block %i32.2 [concrete = constants.%i32] {
  441. // CHECK:STDOUT: %int_32.2: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  442. // CHECK:STDOUT: %i32.2: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  443. // CHECK:STDOUT: }
  444. // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param
  445. // CHECK:STDOUT: %c.param: %i32 = value_param call_param2
  446. // CHECK:STDOUT: %.3: type = splice_block %i32.1 [concrete = constants.%i32] {
  447. // CHECK:STDOUT: %int_32.1: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  448. // CHECK:STDOUT: %i32.1: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  449. // CHECK:STDOUT: }
  450. // CHECK:STDOUT: %c: %i32 = bind_name c, %c.param
  451. // CHECK:STDOUT: }
  452. // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {}
  453. // CHECK:STDOUT: %.8ab: %.ed9 = cpp_overload_set_value @Int.as.ImplicitAs.impl.Convert [concrete = constants.%empty_struct.61d]
  454. // CHECK:STDOUT: %B__carbon_thunk.decl: %B__carbon_thunk.type = fn_decl @B__carbon_thunk [concrete = constants.%B__carbon_thunk] {
  455. // CHECK:STDOUT: %this.patt: %pattern_type.45c = binding_pattern this [concrete]
  456. // CHECK:STDOUT: %this.param_patt: %pattern_type.45c = value_param_pattern %this.patt, call_param0 [concrete]
  457. // CHECK:STDOUT: %a.patt: %pattern_type.7ce = binding_pattern a [concrete]
  458. // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param1 [concrete]
  459. // CHECK:STDOUT: } {
  460. // CHECK:STDOUT: %this.param: %ptr.1f9 = value_param call_param0
  461. // CHECK:STDOUT: %this: %ptr.1f9 = bind_name this, %this.param
  462. // CHECK:STDOUT: %a.param: %i32 = value_param call_param1
  463. // CHECK:STDOUT: %.1: type = splice_block %i32 [concrete = constants.%i32] {
  464. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  465. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  466. // CHECK:STDOUT: }
  467. // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
  468. // CHECK:STDOUT: }
  469. // CHECK:STDOUT: %.7af: %.ce5 = cpp_overload_set_value @A.2 [concrete = constants.%empty_struct.a7d]
  470. // CHECK:STDOUT: %C__carbon_thunk.decl: %C__carbon_thunk.type = fn_decl @C__carbon_thunk [concrete = constants.%C__carbon_thunk] {
  471. // CHECK:STDOUT: %a.patt: %pattern_type.7ce = binding_pattern a [concrete]
  472. // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete]
  473. // CHECK:STDOUT: } {
  474. // CHECK:STDOUT: %a.param: %i32 = value_param call_param0
  475. // CHECK:STDOUT: %.1: type = splice_block %i32 [concrete = constants.%i32] {
  476. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  477. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  478. // CHECK:STDOUT: }
  479. // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
  480. // CHECK:STDOUT: }
  481. // CHECK:STDOUT: %.7b7: %.c13 = cpp_overload_set_value @A__carbon_thunk.2 [concrete = constants.%empty_struct.576]
  482. // CHECK:STDOUT: %D__carbon_thunk.decl: %D__carbon_thunk.type = fn_decl @D__carbon_thunk [concrete = constants.%D__carbon_thunk] {
  483. // CHECK:STDOUT: %_.patt: %pattern_type.45c = binding_pattern _ [concrete]
  484. // CHECK:STDOUT: %_.param_patt: %pattern_type.45c = value_param_pattern %_.patt, call_param0 [concrete]
  485. // CHECK:STDOUT: %a.patt: %pattern_type.7ce = binding_pattern a [concrete]
  486. // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param1 [concrete]
  487. // CHECK:STDOUT: } {
  488. // CHECK:STDOUT: %_.param: %ptr.1f9 = value_param call_param0
  489. // CHECK:STDOUT: %_: %ptr.1f9 = bind_name _, %_.param
  490. // CHECK:STDOUT: %a.param: %i32 = value_param call_param1
  491. // CHECK:STDOUT: %.1: type = splice_block %i32 [concrete = constants.%i32] {
  492. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  493. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  494. // CHECK:STDOUT: }
  495. // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param
  496. // CHECK:STDOUT: }
  497. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  498. // CHECK:STDOUT: }
  499. // CHECK:STDOUT:
  500. // CHECK:STDOUT: file {
  501. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  502. // CHECK:STDOUT: .Core = imports.%Core
  503. // CHECK:STDOUT: .Cpp = imports.%Cpp
  504. // CHECK:STDOUT: .Call = %Call.decl
  505. // CHECK:STDOUT: }
  506. // CHECK:STDOUT: %Core.import = import Core
  507. // CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
  508. // CHECK:STDOUT: import Cpp "functions.h"
  509. // CHECK:STDOUT: }
  510. // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [concrete = constants.%Call] {} {}
  511. // CHECK:STDOUT: }
  512. // CHECK:STDOUT:
  513. // CHECK:STDOUT: class @X {
  514. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
  515. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
  516. // CHECK:STDOUT: complete_type_witness = %complete_type
  517. // CHECK:STDOUT:
  518. // CHECK:STDOUT: !members:
  519. // CHECK:STDOUT: .B = imports.%.8ab
  520. // CHECK:STDOUT: .C = imports.%.7af
  521. // CHECK:STDOUT: .D = imports.%.7b7
  522. // CHECK:STDOUT: import Cpp//...
  523. // CHECK:STDOUT: }
  524. // CHECK:STDOUT:
  525. // CHECK:STDOUT: fn @Call() {
  526. // CHECK:STDOUT: !entry:
  527. // CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  528. // CHECK:STDOUT: %A.ref.loc8: %.490 = name_ref A, imports.%.7c0 [concrete = constants.%empty_struct.a89]
  529. // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  530. // CHECK:STDOUT: %int_2.loc8: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  531. // CHECK:STDOUT: %impl.elem0.loc8_9: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  532. // CHECK:STDOUT: %bound_method.loc8_9.1: <bound method> = bound_method %int_1.loc8, %impl.elem0.loc8_9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.abf]
  533. // CHECK:STDOUT: %specific_fn.loc8_9: <specific function> = specific_function %impl.elem0.loc8_9, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  534. // CHECK:STDOUT: %bound_method.loc8_9.2: <bound method> = bound_method %int_1.loc8, %specific_fn.loc8_9 [concrete = constants.%bound_method.c11]
  535. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_9: init %i32 = call %bound_method.loc8_9.2(%int_1.loc8) [concrete = constants.%int_1.5d2]
  536. // CHECK:STDOUT: %.loc8_9.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_9 [concrete = constants.%int_1.5d2]
  537. // CHECK:STDOUT: %.loc8_9.2: %i32 = converted %int_1.loc8, %.loc8_9.1 [concrete = constants.%int_1.5d2]
  538. // CHECK:STDOUT: %impl.elem0.loc8_12: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  539. // CHECK:STDOUT: %bound_method.loc8_12.1: <bound method> = bound_method %int_2.loc8, %impl.elem0.loc8_12 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b82]
  540. // CHECK:STDOUT: %specific_fn.loc8_12: <specific function> = specific_function %impl.elem0.loc8_12, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  541. // CHECK:STDOUT: %bound_method.loc8_12.2: <bound method> = bound_method %int_2.loc8, %specific_fn.loc8_12 [concrete = constants.%bound_method.8bd]
  542. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_12: init %i32 = call %bound_method.loc8_12.2(%int_2.loc8) [concrete = constants.%int_2.ef8]
  543. // CHECK:STDOUT: %.loc8_12.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_12 [concrete = constants.%int_2.ef8]
  544. // CHECK:STDOUT: %.loc8_12.2: %i32 = converted %int_2.loc8, %.loc8_12.1 [concrete = constants.%int_2.ef8]
  545. // CHECK:STDOUT: %A__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%A__carbon_thunk.decl.713db8.1(%.loc8_9.2, %.loc8_12.2)
  546. // CHECK:STDOUT: %Cpp.ref.loc9: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  547. // CHECK:STDOUT: %A.ref.loc9: %.490 = name_ref A, imports.%.7c0 [concrete = constants.%empty_struct.a89]
  548. // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  549. // CHECK:STDOUT: %int_2.loc9: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  550. // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  551. // CHECK:STDOUT: %impl.elem0.loc9_9: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  552. // CHECK:STDOUT: %bound_method.loc9_9.1: <bound method> = bound_method %int_1.loc9, %impl.elem0.loc9_9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.abf]
  553. // CHECK:STDOUT: %specific_fn.loc9_9: <specific function> = specific_function %impl.elem0.loc9_9, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  554. // CHECK:STDOUT: %bound_method.loc9_9.2: <bound method> = bound_method %int_1.loc9, %specific_fn.loc9_9 [concrete = constants.%bound_method.c11]
  555. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_9: init %i32 = call %bound_method.loc9_9.2(%int_1.loc9) [concrete = constants.%int_1.5d2]
  556. // CHECK:STDOUT: %.loc9_9.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_9 [concrete = constants.%int_1.5d2]
  557. // CHECK:STDOUT: %.loc9_9.2: %i32 = converted %int_1.loc9, %.loc9_9.1 [concrete = constants.%int_1.5d2]
  558. // CHECK:STDOUT: %impl.elem0.loc9_12: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  559. // CHECK:STDOUT: %bound_method.loc9_12.1: <bound method> = bound_method %int_2.loc9, %impl.elem0.loc9_12 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b82]
  560. // CHECK:STDOUT: %specific_fn.loc9_12: <specific function> = specific_function %impl.elem0.loc9_12, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  561. // CHECK:STDOUT: %bound_method.loc9_12.2: <bound method> = bound_method %int_2.loc9, %specific_fn.loc9_12 [concrete = constants.%bound_method.8bd]
  562. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_12: init %i32 = call %bound_method.loc9_12.2(%int_2.loc9) [concrete = constants.%int_2.ef8]
  563. // CHECK:STDOUT: %.loc9_12.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_12 [concrete = constants.%int_2.ef8]
  564. // CHECK:STDOUT: %.loc9_12.2: %i32 = converted %int_2.loc9, %.loc9_12.1 [concrete = constants.%int_2.ef8]
  565. // CHECK:STDOUT: %impl.elem0.loc9_15: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  566. // CHECK:STDOUT: %bound_method.loc9_15.1: <bound method> = bound_method %int_3, %impl.elem0.loc9_15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.595]
  567. // CHECK:STDOUT: %specific_fn.loc9_15: <specific function> = specific_function %impl.elem0.loc9_15, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  568. // CHECK:STDOUT: %bound_method.loc9_15.2: <bound method> = bound_method %int_3, %specific_fn.loc9_15 [concrete = constants.%bound_method.f36]
  569. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_15: init %i32 = call %bound_method.loc9_15.2(%int_3) [concrete = constants.%int_3.822]
  570. // CHECK:STDOUT: %.loc9_15.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_15 [concrete = constants.%int_3.822]
  571. // CHECK:STDOUT: %.loc9_15.2: %i32 = converted %int_3, %.loc9_15.1 [concrete = constants.%int_3.822]
  572. // CHECK:STDOUT: %A__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%A__carbon_thunk.decl.713db8.2(%.loc9_9.2, %.loc9_12.2, %.loc9_15.2)
  573. // CHECK:STDOUT: %.loc10_5.1: %empty_struct_type = struct_literal ()
  574. // CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  575. // CHECK:STDOUT: %X.ref.loc10: type = name_ref X, imports.%X.decl [concrete = constants.%X]
  576. // CHECK:STDOUT: %.loc10_5.2: ref %X = temporary_storage
  577. // CHECK:STDOUT: %.loc10_5.3: init %X = class_init (), %.loc10_5.2 [concrete = constants.%X.val]
  578. // CHECK:STDOUT: %.loc10_5.4: ref %X = temporary %.loc10_5.2, %.loc10_5.3
  579. // CHECK:STDOUT: %.loc10_7: ref %X = converted %.loc10_5.1, %.loc10_5.4
  580. // CHECK:STDOUT: %B.ref: %.ed9 = name_ref B, imports.%.8ab [concrete = constants.%empty_struct.61d]
  581. // CHECK:STDOUT: %bound_method.loc10_16: <bound method> = bound_method %.loc10_7, %B.ref
  582. // CHECK:STDOUT: %int_1.loc10: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  583. // CHECK:STDOUT: %addr.loc10_7: %ptr.1f9 = addr_of %.loc10_7
  584. // CHECK:STDOUT: %impl.elem0.loc10: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  585. // CHECK:STDOUT: %bound_method.loc10_19.1: <bound method> = bound_method %int_1.loc10, %impl.elem0.loc10 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.abf]
  586. // 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]
  587. // CHECK:STDOUT: %bound_method.loc10_19.2: <bound method> = bound_method %int_1.loc10, %specific_fn.loc10 [concrete = constants.%bound_method.c11]
  588. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10: init %i32 = call %bound_method.loc10_19.2(%int_1.loc10) [concrete = constants.%int_1.5d2]
  589. // CHECK:STDOUT: %.loc10_19.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10 [concrete = constants.%int_1.5d2]
  590. // CHECK:STDOUT: %.loc10_19.2: %i32 = converted %int_1.loc10, %.loc10_19.1 [concrete = constants.%int_1.5d2]
  591. // CHECK:STDOUT: %B__carbon_thunk.call: init %empty_tuple.type = call imports.%B__carbon_thunk.decl(%addr.loc10_7, %.loc10_19.2)
  592. // CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  593. // CHECK:STDOUT: %X.ref.loc11: type = name_ref X, imports.%X.decl [concrete = constants.%X]
  594. // CHECK:STDOUT: %C.ref: %.ce5 = name_ref C, imports.%.7af [concrete = constants.%empty_struct.a7d]
  595. // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  596. // CHECK:STDOUT: %impl.elem0.loc11: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  597. // CHECK:STDOUT: %bound_method.loc11_11.1: <bound method> = bound_method %int_1.loc11, %impl.elem0.loc11 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.abf]
  598. // CHECK:STDOUT: %specific_fn.loc11: <specific function> = specific_function %impl.elem0.loc11, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  599. // CHECK:STDOUT: %bound_method.loc11_11.2: <bound method> = bound_method %int_1.loc11, %specific_fn.loc11 [concrete = constants.%bound_method.c11]
  600. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11: init %i32 = call %bound_method.loc11_11.2(%int_1.loc11) [concrete = constants.%int_1.5d2]
  601. // CHECK:STDOUT: %.loc11_11.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11 [concrete = constants.%int_1.5d2]
  602. // CHECK:STDOUT: %.loc11_11.2: %i32 = converted %int_1.loc11, %.loc11_11.1 [concrete = constants.%int_1.5d2]
  603. // CHECK:STDOUT: %C__carbon_thunk.call: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%.loc11_11.2)
  604. // CHECK:STDOUT: %.loc12_5.1: %empty_struct_type = struct_literal ()
  605. // CHECK:STDOUT: %Cpp.ref.loc12: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  606. // CHECK:STDOUT: %X.ref.loc12: type = name_ref X, imports.%X.decl [concrete = constants.%X]
  607. // CHECK:STDOUT: %.loc12_5.2: ref %X = temporary_storage
  608. // CHECK:STDOUT: %.loc12_5.3: init %X = class_init (), %.loc12_5.2 [concrete = constants.%X.val]
  609. // CHECK:STDOUT: %.loc12_5.4: ref %X = temporary %.loc12_5.2, %.loc12_5.3
  610. // CHECK:STDOUT: %.loc12_7.1: ref %X = converted %.loc12_5.1, %.loc12_5.4
  611. // CHECK:STDOUT: %D.ref: %.c13 = name_ref D, imports.%.7b7 [concrete = constants.%empty_struct.576]
  612. // CHECK:STDOUT: %bound_method.loc12_16: <bound method> = bound_method %.loc12_7.1, %D.ref
  613. // CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  614. // CHECK:STDOUT: %.loc12_7.2: %X = bind_value %.loc12_7.1
  615. // CHECK:STDOUT: %impl.elem0.loc12: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  616. // CHECK:STDOUT: %bound_method.loc12_19.1: <bound method> = bound_method %int_1.loc12, %impl.elem0.loc12 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.abf]
  617. // CHECK:STDOUT: %specific_fn.loc12: <specific function> = specific_function %impl.elem0.loc12, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  618. // CHECK:STDOUT: %bound_method.loc12_19.2: <bound method> = bound_method %int_1.loc12, %specific_fn.loc12 [concrete = constants.%bound_method.c11]
  619. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12: init %i32 = call %bound_method.loc12_19.2(%int_1.loc12) [concrete = constants.%int_1.5d2]
  620. // CHECK:STDOUT: %.loc12_19.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12 [concrete = constants.%int_1.5d2]
  621. // CHECK:STDOUT: %.loc12_19.2: %i32 = converted %int_1.loc12, %.loc12_19.1 [concrete = constants.%int_1.5d2]
  622. // CHECK:STDOUT: %.loc12_7.3: ref %X = value_as_ref %.loc12_7.2
  623. // CHECK:STDOUT: %addr.loc12_20: %ptr.1f9 = addr_of %.loc12_7.3
  624. // CHECK:STDOUT: %D__carbon_thunk.call: init %empty_tuple.type = call imports.%D__carbon_thunk.decl(%addr.loc12_20, %.loc12_19.2)
  625. // CHECK:STDOUT: %facet_value.loc12: %type_where = facet_value constants.%X, () [concrete = constants.%facet_value]
  626. // CHECK:STDOUT: %.loc12_5.5: %type_where = converted constants.%X, %facet_value.loc12 [concrete = constants.%facet_value]
  627. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc12: <bound method> = bound_method %.loc12_5.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.55b
  628. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1: <specific function> = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.55b, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn]
  629. // CHECK:STDOUT: %bound_method.loc12_5: <bound method> = bound_method %.loc12_5.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1
  630. // CHECK:STDOUT: %addr.loc12_5: %ptr.1f9 = addr_of %.loc12_5.4
  631. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc12: init %empty_tuple.type = call %bound_method.loc12_5(%addr.loc12_5)
  632. // CHECK:STDOUT: %facet_value.loc10: %type_where = facet_value constants.%X, () [concrete = constants.%facet_value]
  633. // CHECK:STDOUT: %.loc10_5.5: %type_where = converted constants.%X, %facet_value.loc10 [concrete = constants.%facet_value]
  634. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc10: <bound method> = bound_method %.loc10_5.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.55b
  635. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2: <specific function> = specific_function constants.%AggregateT.as_type.as.Destroy.impl.Op.55b, @AggregateT.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%AggregateT.as_type.as.Destroy.impl.Op.specific_fn]
  636. // CHECK:STDOUT: %bound_method.loc10_5: <bound method> = bound_method %.loc10_5.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2
  637. // CHECK:STDOUT: %addr.loc10_5: %ptr.1f9 = addr_of %.loc10_5.4
  638. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc10: init %empty_tuple.type = call %bound_method.loc10_5(%addr.loc10_5)
  639. // CHECK:STDOUT: return
  640. // CHECK:STDOUT: }
  641. // CHECK:STDOUT:
  642. // CHECK:STDOUT: fn @A.1(%a.param: %i32, %b.param: %i32);
  643. // CHECK:STDOUT:
  644. // CHECK:STDOUT: fn @A__carbon_thunk.1(%a.param: %i32, %b.param: %i32);
  645. // CHECK:STDOUT:
  646. // CHECK:STDOUT: fn @A.2(%a.param: %i32, %b.param: %i32, %c.param: %i32);
  647. // CHECK:STDOUT:
  648. // CHECK:STDOUT: fn @A__carbon_thunk.2(%a.param: %i32, %b.param: %i32, %c.param: %i32);
  649. // CHECK:STDOUT:
  650. // CHECK:STDOUT: fn @X.B(%self.param: %ptr.1f9, %a.param: %i32);
  651. // CHECK:STDOUT:
  652. // CHECK:STDOUT: fn @B__carbon_thunk(%this.param: %ptr.1f9, %a.param: %i32);
  653. // CHECK:STDOUT:
  654. // CHECK:STDOUT: fn @X.C(%a.param: %i32);
  655. // CHECK:STDOUT:
  656. // CHECK:STDOUT: fn @C__carbon_thunk(%a.param: %i32);
  657. // CHECK:STDOUT:
  658. // CHECK:STDOUT: fn @X.D(%self.param: %X, %a.param: %i32);
  659. // CHECK:STDOUT:
  660. // CHECK:STDOUT: fn @D__carbon_thunk(%_.param: %ptr.1f9, %a.param: %i32);
  661. // CHECK:STDOUT:
  662. // CHECK:STDOUT: --- fail_call_too_few_args.carbon
  663. // CHECK:STDOUT:
  664. // CHECK:STDOUT: constants {
  665. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  666. // CHECK:STDOUT: %.490: type = cpp_overload_set_type @const.as.Destroy.impl.Op [concrete]
  667. // CHECK:STDOUT: %empty_struct.a89: %.490 = struct_value () [concrete]
  668. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete]
  669. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  670. // CHECK:STDOUT: %X: type = class_type @X [concrete]
  671. // CHECK:STDOUT: %X.val: %X = struct_value () [concrete]
  672. // CHECK:STDOUT: %.ed9: type = cpp_overload_set_type @<null name> [concrete]
  673. // CHECK:STDOUT: %empty_struct.61d: %.ed9 = struct_value () [concrete]
  674. // CHECK:STDOUT: %.ce5: type = cpp_overload_set_type @<null name> [concrete]
  675. // CHECK:STDOUT: %empty_struct.a7d: %.ce5 = struct_value () [concrete]
  676. // CHECK:STDOUT: %.c13: type = cpp_overload_set_type @<null name> [concrete]
  677. // CHECK:STDOUT: %empty_struct.576: %.c13 = struct_value () [concrete]
  678. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanAggregateDestroy>> [concrete]
  679. // CHECK:STDOUT: %facet_value: %type_where = facet_value %X, () [concrete]
  680. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.d91: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete]
  681. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.55b: %AggregateT.as_type.as.Destroy.impl.Op.type.d91 = struct_value () [concrete]
  682. // CHECK:STDOUT: %ptr.1f9: type = ptr_type %X [concrete]
  683. // CHECK:STDOUT: }
  684. // CHECK:STDOUT:
  685. // CHECK:STDOUT: imports {
  686. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  687. // CHECK:STDOUT: .A = %.7c0
  688. // CHECK:STDOUT: .X = %X.decl
  689. // CHECK:STDOUT: import Cpp//...
  690. // CHECK:STDOUT: }
  691. // CHECK:STDOUT: %.7c0: %.490 = cpp_overload_set_value @const.as.Destroy.impl.Op [concrete = constants.%empty_struct.a89]
  692. // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {}
  693. // CHECK:STDOUT: %.8ab: %.ed9 = cpp_overload_set_value @<null name> [concrete = constants.%empty_struct.61d]
  694. // CHECK:STDOUT: %.7af: %.ce5 = cpp_overload_set_value @<null name> [concrete = constants.%empty_struct.a7d]
  695. // CHECK:STDOUT: %.7b7: %.c13 = cpp_overload_set_value @<null name> [concrete = constants.%empty_struct.576]
  696. // CHECK:STDOUT: }
  697. // CHECK:STDOUT:
  698. // CHECK:STDOUT: fn @Call() {
  699. // CHECK:STDOUT: !entry:
  700. // CHECK:STDOUT: %Cpp.ref.loc16: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  701. // CHECK:STDOUT: %A.ref.loc16: %.490 = name_ref A, imports.%.7c0 [concrete = constants.%empty_struct.a89]
  702. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
  703. // CHECK:STDOUT: %Cpp.ref.loc26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  704. // CHECK:STDOUT: %A.ref.loc26: %.490 = name_ref A, imports.%.7c0 [concrete = constants.%empty_struct.a89]
  705. // CHECK:STDOUT: %.loc36_5.1: %empty_struct_type = struct_literal ()
  706. // CHECK:STDOUT: %Cpp.ref.loc36: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  707. // CHECK:STDOUT: %X.ref.loc36: type = name_ref X, imports.%X.decl [concrete = constants.%X]
  708. // CHECK:STDOUT: %.loc36_5.2: ref %X = temporary_storage
  709. // CHECK:STDOUT: %.loc36_5.3: init %X = class_init (), %.loc36_5.2 [concrete = constants.%X.val]
  710. // CHECK:STDOUT: %.loc36_5.4: ref %X = temporary %.loc36_5.2, %.loc36_5.3
  711. // CHECK:STDOUT: %.loc36_7: ref %X = converted %.loc36_5.1, %.loc36_5.4
  712. // CHECK:STDOUT: %B.ref: %.ed9 = name_ref B, imports.%.8ab [concrete = constants.%empty_struct.61d]
  713. // CHECK:STDOUT: %bound_method.loc36_16: <bound method> = bound_method %.loc36_7, %B.ref
  714. // CHECK:STDOUT: %Cpp.ref.loc46: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  715. // CHECK:STDOUT: %X.ref.loc46: type = name_ref X, imports.%X.decl [concrete = constants.%X]
  716. // CHECK:STDOUT: %C.ref: %.ce5 = name_ref C, imports.%.7af [concrete = constants.%empty_struct.a7d]
  717. // CHECK:STDOUT: %.loc56_5.1: %empty_struct_type = struct_literal ()
  718. // CHECK:STDOUT: %Cpp.ref.loc56: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  719. // CHECK:STDOUT: %X.ref.loc56: type = name_ref X, imports.%X.decl [concrete = constants.%X]
  720. // CHECK:STDOUT: %.loc56_5.2: ref %X = temporary_storage
  721. // CHECK:STDOUT: %.loc56_5.3: init %X = class_init (), %.loc56_5.2 [concrete = constants.%X.val]
  722. // CHECK:STDOUT: %.loc56_5.4: ref %X = temporary %.loc56_5.2, %.loc56_5.3
  723. // CHECK:STDOUT: %.loc56_7: ref %X = converted %.loc56_5.1, %.loc56_5.4
  724. // CHECK:STDOUT: %D.ref: %.c13 = name_ref D, imports.%.7b7 [concrete = constants.%empty_struct.576]
  725. // CHECK:STDOUT: %bound_method.loc56_16: <bound method> = bound_method %.loc56_7, %D.ref
  726. // CHECK:STDOUT: %facet_value.loc56: %type_where = facet_value constants.%X, () [concrete = constants.%facet_value]
  727. // CHECK:STDOUT: %.loc56_5.5: %type_where = converted constants.%X, %facet_value.loc56 [concrete = constants.%facet_value]
  728. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc56: <bound method> = bound_method %.loc56_5.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.55b
  729. // CHECK:STDOUT: <elided>
  730. // CHECK:STDOUT: %bound_method.loc56_5: <bound method> = bound_method %.loc56_5.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1
  731. // CHECK:STDOUT: %addr.loc56: %ptr.1f9 = addr_of %.loc56_5.4
  732. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc56: init %empty_tuple.type = call %bound_method.loc56_5(%addr.loc56)
  733. // CHECK:STDOUT: %facet_value.loc36: %type_where = facet_value constants.%X, () [concrete = constants.%facet_value]
  734. // CHECK:STDOUT: %.loc36_5.5: %type_where = converted constants.%X, %facet_value.loc36 [concrete = constants.%facet_value]
  735. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc36: <bound method> = bound_method %.loc36_5.4, constants.%AggregateT.as_type.as.Destroy.impl.Op.55b
  736. // CHECK:STDOUT: <elided>
  737. // CHECK:STDOUT: %bound_method.loc36_5: <bound method> = bound_method %.loc36_5.4, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2
  738. // CHECK:STDOUT: %addr.loc36: %ptr.1f9 = addr_of %.loc36_5.4
  739. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc36: init %empty_tuple.type = call %bound_method.loc36_5(%addr.loc36)
  740. // CHECK:STDOUT: <elided>
  741. // CHECK:STDOUT: }
  742. // CHECK:STDOUT: