constructor.carbon 69 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895
  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. //
  7. // AUTOUPDATE
  8. // TIP: To test this file alone, run:
  9. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interop/cpp/class/constructor.carbon
  10. // TIP: To dump output, run:
  11. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interop/cpp/class/constructor.carbon
  12. // ============================================================================
  13. // Default constructor
  14. // ============================================================================
  15. // --- default.h
  16. class C {
  17. public:
  18. C();
  19. };
  20. // --- import_default.carbon
  21. library "[[@TEST_NAME]]";
  22. import Cpp library "default.h";
  23. fn F() {
  24. //@dump-sem-ir-begin
  25. let c: Cpp.C = Cpp.C.C();
  26. //@dump-sem-ir-end
  27. }
  28. // ============================================================================
  29. // Non default constructor
  30. // ============================================================================
  31. // --- non_default.h
  32. class C {
  33. public:
  34. C(int x, int y);
  35. };
  36. // --- import_non_default.carbon
  37. library "[[@TEST_NAME]]";
  38. import Cpp library "non_default.h";
  39. fn F() {
  40. //@dump-sem-ir-begin
  41. let c: Cpp.C = Cpp.C.C(123, 456);
  42. //@dump-sem-ir-end
  43. }
  44. // ============================================================================
  45. // Multiple constructors
  46. // ============================================================================
  47. // --- multiple.h
  48. class C {
  49. public:
  50. C();
  51. C(int x, int y);
  52. };
  53. // --- import_multiple.carbon
  54. library "[[@TEST_NAME]]";
  55. import Cpp library "multiple.h";
  56. fn F() {
  57. //@dump-sem-ir-begin
  58. let c1: Cpp.C = Cpp.C.C();
  59. let c2: Cpp.C = Cpp.C.C(123, 456);
  60. //@dump-sem-ir-end
  61. }
  62. // ============================================================================
  63. // Constructor with default values
  64. // ============================================================================
  65. // --- default_values.h
  66. class C {
  67. public:
  68. C(int x, int y = 8);
  69. };
  70. // --- fail_todo_import_default_values.carbon
  71. library "[[@TEST_NAME]]";
  72. import Cpp library "default_values.h";
  73. fn F() {
  74. //@dump-sem-ir-begin
  75. let c1: Cpp.C = Cpp.C.C(8, 9);
  76. // CHECK:STDERR: fail_todo_import_default_values.carbon:[[@LINE+5]]:19: error: 1 argument passed to function expecting 2 arguments [CallArgCountMismatch]
  77. // CHECK:STDERR: let c2: Cpp.C = Cpp.C.C(8);
  78. // CHECK:STDERR: ^~~~~~~~~~
  79. // CHECK:STDERR: fail_todo_import_default_values.carbon: note: calling function declared here [InCallToEntity]
  80. // CHECK:STDERR:
  81. let c2: Cpp.C = Cpp.C.C(8);
  82. //@dump-sem-ir-end
  83. }
  84. // ============================================================================
  85. // No constructors
  86. // ============================================================================
  87. // --- none.h
  88. class C {
  89. public:
  90. C() = delete;
  91. };
  92. // --- fail_import_none.carbon
  93. library "[[@TEST_NAME]]";
  94. import Cpp library "none.h";
  95. fn F() {
  96. // CHECK:STDERR: fail_import_none.carbon:[[@LINE+4]]:18: error: member name `C` not found in `Cpp.C` [MemberNameNotFoundInInstScope]
  97. // CHECK:STDERR: let c: Cpp.C = Cpp.C.C();
  98. // CHECK:STDERR: ^~~~~~~
  99. // CHECK:STDERR:
  100. let c: Cpp.C = Cpp.C.C();
  101. }
  102. // ============================================================================
  103. // Implicit single argument constructor
  104. // ============================================================================
  105. // --- implicit_single_argument.h
  106. class C {
  107. public:
  108. C(int x);
  109. };
  110. // --- fail_todo_import_implicit_single_argument.carbon
  111. library "[[@TEST_NAME]]";
  112. import Cpp library "implicit_single_argument.h";
  113. fn F() {
  114. //@dump-sem-ir-begin
  115. let c1: Cpp.C = Cpp.C.C(8);
  116. // CHECK:STDERR: fail_todo_import_implicit_single_argument.carbon:[[@LINE+7]]:19: error: cannot implicitly convert expression of type `i32` to `Cpp.C` [ConversionFailure]
  117. // CHECK:STDERR: let c2: Cpp.C = 8 as i32;
  118. // CHECK:STDERR: ^~~~~~~~
  119. // CHECK:STDERR: fail_todo_import_implicit_single_argument.carbon:[[@LINE+4]]:19: note: type `i32` does not implement interface `Core.ImplicitAs(Cpp.C)` [MissingImplInMemberAccessNote]
  120. // CHECK:STDERR: let c2: Cpp.C = 8 as i32;
  121. // CHECK:STDERR: ^~~~~~~~
  122. // CHECK:STDERR:
  123. let c2: Cpp.C = 8 as i32;
  124. //@dump-sem-ir-end
  125. }
  126. // ============================================================================
  127. // Implicit multi arguments constructor
  128. // ============================================================================
  129. // --- implicit_multi_arguments.h
  130. class C {
  131. public:
  132. C(int x, int y = 8);
  133. };
  134. // --- fail_todo_import_implicit_multi_arguments.carbon
  135. library "[[@TEST_NAME]]";
  136. import Cpp library "implicit_multi_arguments.h";
  137. fn F() {
  138. //@dump-sem-ir-begin
  139. let c1: Cpp.C = Cpp.C.C(8, 9);
  140. // CHECK:STDERR: fail_todo_import_implicit_multi_arguments.carbon:[[@LINE+5]]:19: error: 1 argument passed to function expecting 2 arguments [CallArgCountMismatch]
  141. // CHECK:STDERR: let c2: Cpp.C = Cpp.C.C(8);
  142. // CHECK:STDERR: ^~~~~~~~~~
  143. // CHECK:STDERR: fail_todo_import_implicit_multi_arguments.carbon: note: calling function declared here [InCallToEntity]
  144. // CHECK:STDERR:
  145. let c2: Cpp.C = Cpp.C.C(8);
  146. // CHECK:STDERR: fail_todo_import_implicit_multi_arguments.carbon:[[@LINE+7]]:19: error: cannot implicitly convert expression of type `i32` to `Cpp.C` [ConversionFailure]
  147. // CHECK:STDERR: let c3: Cpp.C = 8 as i32;
  148. // CHECK:STDERR: ^~~~~~~~
  149. // CHECK:STDERR: fail_todo_import_implicit_multi_arguments.carbon:[[@LINE+4]]:19: note: type `i32` does not implement interface `Core.ImplicitAs(Cpp.C)` [MissingImplInMemberAccessNote]
  150. // CHECK:STDERR: let c3: Cpp.C = 8 as i32;
  151. // CHECK:STDERR: ^~~~~~~~
  152. // CHECK:STDERR:
  153. let c3: Cpp.C = 8 as i32;
  154. //@dump-sem-ir-end
  155. }
  156. // ============================================================================
  157. // Trying to call a constructor of an incomplete class
  158. // ============================================================================
  159. // --- incomplete.h
  160. class C;
  161. // --- fail_import_incomplete.carbon
  162. library "[[@TEST_NAME]]";
  163. import Cpp library "incomplete.h";
  164. fn F() {
  165. // CHECK:STDERR: fail_import_incomplete.carbon:[[@LINE+8]]:4: error: member access into incomplete class `Cpp.C` [QualifiedExprInIncompleteClassScope]
  166. // CHECK:STDERR: Cpp.C.C();
  167. // CHECK:STDERR: ^~~~~~~
  168. // CHECK:STDERR: fail_import_incomplete.carbon:[[@LINE-6]]:10: in file included here [InCppInclude]
  169. // CHECK:STDERR: ./incomplete.h:2:7: note: class was forward declared here [ClassForwardDeclaredHere]
  170. // CHECK:STDERR: class C;
  171. // CHECK:STDERR: ^
  172. // CHECK:STDERR:
  173. Cpp.C.C();
  174. }
  175. // CHECK:STDOUT: --- import_default.carbon
  176. // CHECK:STDOUT:
  177. // CHECK:STDOUT: constants {
  178. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  179. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  180. // CHECK:STDOUT: %pattern_type.217: type = pattern_type %C [concrete]
  181. // CHECK:STDOUT: %.d40: type = cpp_overload_set_type @C.C [concrete]
  182. // CHECK:STDOUT: %empty_struct: %.d40 = struct_value () [concrete]
  183. // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete]
  184. // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete]
  185. // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete]
  186. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanAggregateDestroy>> [concrete]
  187. // CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete]
  188. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete]
  189. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete]
  190. // CHECK:STDOUT: }
  191. // CHECK:STDOUT:
  192. // CHECK:STDOUT: imports {
  193. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  194. // CHECK:STDOUT: .C = %C.decl
  195. // CHECK:STDOUT: import Cpp//...
  196. // CHECK:STDOUT: }
  197. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  198. // CHECK:STDOUT: %.40b: %.d40 = cpp_overload_set_value @C.C [concrete = constants.%empty_struct]
  199. // CHECK:STDOUT: %C__carbon_thunk.decl: %C__carbon_thunk.type = fn_decl @C__carbon_thunk [concrete = constants.%C__carbon_thunk] {
  200. // CHECK:STDOUT: <elided>
  201. // CHECK:STDOUT: } {
  202. // CHECK:STDOUT: <elided>
  203. // CHECK:STDOUT: }
  204. // CHECK:STDOUT: }
  205. // CHECK:STDOUT:
  206. // CHECK:STDOUT: fn @F() {
  207. // CHECK:STDOUT: !entry:
  208. // CHECK:STDOUT: name_binding_decl {
  209. // CHECK:STDOUT: %c.patt: %pattern_type.217 = binding_pattern c [concrete]
  210. // CHECK:STDOUT: }
  211. // CHECK:STDOUT: %Cpp.ref.loc8_18: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  212. // CHECK:STDOUT: %C.ref.loc8_21: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  213. // CHECK:STDOUT: %C.ref.loc8_23: %.d40 = name_ref C, imports.%.40b [concrete = constants.%empty_struct]
  214. // CHECK:STDOUT: %.loc8_26.1: ref %C = temporary_storage
  215. // CHECK:STDOUT: %addr.loc8_26.1: %ptr.d9e = addr_of %.loc8_26.1
  216. // CHECK:STDOUT: %C__carbon_thunk.call: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc8_26.1)
  217. // CHECK:STDOUT: %.loc8_26.2: init %C = in_place_init %C__carbon_thunk.call, %.loc8_26.1
  218. // CHECK:STDOUT: %.loc8_13: type = splice_block %C.ref.loc8_13 [concrete = constants.%C] {
  219. // CHECK:STDOUT: %Cpp.ref.loc8_10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  220. // CHECK:STDOUT: %C.ref.loc8_13: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  221. // CHECK:STDOUT: }
  222. // CHECK:STDOUT: %.loc8_26.3: ref %C = temporary %.loc8_26.1, %.loc8_26.2
  223. // CHECK:STDOUT: %.loc8_26.4: %C = bind_value %.loc8_26.3
  224. // CHECK:STDOUT: %c: %C = bind_name c, %.loc8_26.4
  225. // CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  226. // CHECK:STDOUT: %.loc8_26.5: %type_where = converted constants.%C, %facet_value [concrete = constants.%facet_value]
  227. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc8_26.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  228. // CHECK:STDOUT: <elided>
  229. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc8_26.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn
  230. // CHECK:STDOUT: %addr.loc8_26.2: %ptr.d9e = addr_of %.loc8_26.3
  231. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%addr.loc8_26.2)
  232. // CHECK:STDOUT: <elided>
  233. // CHECK:STDOUT: }
  234. // CHECK:STDOUT:
  235. // CHECK:STDOUT: --- import_non_default.carbon
  236. // CHECK:STDOUT:
  237. // CHECK:STDOUT: constants {
  238. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  239. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  240. // CHECK:STDOUT: %pattern_type.217: type = pattern_type %C [concrete]
  241. // CHECK:STDOUT: %.d40: type = cpp_overload_set_type @C.C [concrete]
  242. // CHECK:STDOUT: %empty_struct: %.d40 = struct_value () [concrete]
  243. // CHECK:STDOUT: %int_123.fff: Core.IntLiteral = int_value 123 [concrete]
  244. // CHECK:STDOUT: %int_456.010: Core.IntLiteral = int_value 456 [concrete]
  245. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  246. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  247. // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete]
  248. // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete]
  249. // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete]
  250. // CHECK:STDOUT: %ImplicitAs.type.d14: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  251. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  252. // CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
  253. // 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]
  254. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.1c0: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.340 = struct_value () [symbolic]
  255. // CHECK:STDOUT: %ImplicitAs.impl_witness.204: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.9e9, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  256. // 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]
  257. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.584 = struct_value () [concrete]
  258. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.d14 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.204) [concrete]
  259. // CHECK:STDOUT: %.1df: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete]
  260. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.0c9: <bound method> = bound_method %int_123.fff, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  261. // 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]
  262. // CHECK:STDOUT: %bound_method.bec: <bound method> = bound_method %int_123.fff, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  263. // CHECK:STDOUT: %int_123.f7f: %i32 = int_value 123 [concrete]
  264. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.ec6: <bound method> = bound_method %int_456.010, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  265. // CHECK:STDOUT: %bound_method.ed0: <bound method> = bound_method %int_456.010, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  266. // CHECK:STDOUT: %int_456.d17: %i32 = int_value 456 [concrete]
  267. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanAggregateDestroy>> [concrete]
  268. // CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete]
  269. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete]
  270. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete]
  271. // CHECK:STDOUT: }
  272. // CHECK:STDOUT:
  273. // CHECK:STDOUT: imports {
  274. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  275. // CHECK:STDOUT: .C = %C.decl
  276. // CHECK:STDOUT: import Cpp//...
  277. // CHECK:STDOUT: }
  278. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  279. // CHECK:STDOUT: %.40b: %.d40 = cpp_overload_set_value @C.C [concrete = constants.%empty_struct]
  280. // CHECK:STDOUT: %C__carbon_thunk.decl: %C__carbon_thunk.type = fn_decl @C__carbon_thunk [concrete = constants.%C__carbon_thunk] {
  281. // CHECK:STDOUT: <elided>
  282. // CHECK:STDOUT: } {
  283. // CHECK:STDOUT: <elided>
  284. // CHECK:STDOUT: }
  285. // 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)]
  286. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.9e9 = impl_witness_table (%Core.import_ref.ee7), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  287. // CHECK:STDOUT: }
  288. // CHECK:STDOUT:
  289. // CHECK:STDOUT: fn @F() {
  290. // CHECK:STDOUT: !entry:
  291. // CHECK:STDOUT: name_binding_decl {
  292. // CHECK:STDOUT: %c.patt: %pattern_type.217 = binding_pattern c [concrete]
  293. // CHECK:STDOUT: }
  294. // CHECK:STDOUT: %Cpp.ref.loc8_18: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  295. // CHECK:STDOUT: %C.ref.loc8_21: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  296. // CHECK:STDOUT: %C.ref.loc8_23: %.d40 = name_ref C, imports.%.40b [concrete = constants.%empty_struct]
  297. // CHECK:STDOUT: %int_123: Core.IntLiteral = int_value 123 [concrete = constants.%int_123.fff]
  298. // CHECK:STDOUT: %int_456: Core.IntLiteral = int_value 456 [concrete = constants.%int_456.010]
  299. // CHECK:STDOUT: %.loc8_34.1: ref %C = temporary_storage
  300. // CHECK:STDOUT: %impl.elem0.loc8_26: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  301. // CHECK:STDOUT: %bound_method.loc8_26.1: <bound method> = bound_method %int_123, %impl.elem0.loc8_26 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.0c9]
  302. // CHECK:STDOUT: %specific_fn.loc8_26: <specific function> = specific_function %impl.elem0.loc8_26, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  303. // CHECK:STDOUT: %bound_method.loc8_26.2: <bound method> = bound_method %int_123, %specific_fn.loc8_26 [concrete = constants.%bound_method.bec]
  304. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_26: init %i32 = call %bound_method.loc8_26.2(%int_123) [concrete = constants.%int_123.f7f]
  305. // CHECK:STDOUT: %.loc8_26.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_26 [concrete = constants.%int_123.f7f]
  306. // CHECK:STDOUT: %.loc8_26.2: %i32 = converted %int_123, %.loc8_26.1 [concrete = constants.%int_123.f7f]
  307. // CHECK:STDOUT: %impl.elem0.loc8_31: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  308. // CHECK:STDOUT: %bound_method.loc8_31.1: <bound method> = bound_method %int_456, %impl.elem0.loc8_31 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.ec6]
  309. // CHECK:STDOUT: %specific_fn.loc8_31: <specific function> = specific_function %impl.elem0.loc8_31, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  310. // CHECK:STDOUT: %bound_method.loc8_31.2: <bound method> = bound_method %int_456, %specific_fn.loc8_31 [concrete = constants.%bound_method.ed0]
  311. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_31: init %i32 = call %bound_method.loc8_31.2(%int_456) [concrete = constants.%int_456.d17]
  312. // CHECK:STDOUT: %.loc8_31.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_31 [concrete = constants.%int_456.d17]
  313. // CHECK:STDOUT: %.loc8_31.2: %i32 = converted %int_456, %.loc8_31.1 [concrete = constants.%int_456.d17]
  314. // CHECK:STDOUT: %addr.loc8_34.1: %ptr.d9e = addr_of %.loc8_34.1
  315. // CHECK:STDOUT: %C__carbon_thunk.call: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%.loc8_26.2, %.loc8_31.2, %addr.loc8_34.1)
  316. // CHECK:STDOUT: %.loc8_34.2: init %C = in_place_init %C__carbon_thunk.call, %.loc8_34.1
  317. // CHECK:STDOUT: %.loc8_13: type = splice_block %C.ref.loc8_13 [concrete = constants.%C] {
  318. // CHECK:STDOUT: %Cpp.ref.loc8_10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  319. // CHECK:STDOUT: %C.ref.loc8_13: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  320. // CHECK:STDOUT: }
  321. // CHECK:STDOUT: %.loc8_34.3: ref %C = temporary %.loc8_34.1, %.loc8_34.2
  322. // CHECK:STDOUT: %.loc8_34.4: %C = bind_value %.loc8_34.3
  323. // CHECK:STDOUT: %c: %C = bind_name c, %.loc8_34.4
  324. // CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  325. // CHECK:STDOUT: %.loc8_34.5: %type_where = converted constants.%C, %facet_value [concrete = constants.%facet_value]
  326. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc8_34.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  327. // CHECK:STDOUT: <elided>
  328. // CHECK:STDOUT: %bound_method.loc8_34: <bound method> = bound_method %.loc8_34.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn
  329. // CHECK:STDOUT: %addr.loc8_34.2: %ptr.d9e = addr_of %.loc8_34.3
  330. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc8_34(%addr.loc8_34.2)
  331. // CHECK:STDOUT: <elided>
  332. // CHECK:STDOUT: }
  333. // CHECK:STDOUT:
  334. // CHECK:STDOUT: --- import_multiple.carbon
  335. // CHECK:STDOUT:
  336. // CHECK:STDOUT: constants {
  337. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  338. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  339. // CHECK:STDOUT: %pattern_type.217: type = pattern_type %C [concrete]
  340. // CHECK:STDOUT: %.d40: type = cpp_overload_set_type @C.C.1 [concrete]
  341. // CHECK:STDOUT: %empty_struct: %.d40 = struct_value () [concrete]
  342. // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete]
  343. // CHECK:STDOUT: %C__carbon_thunk.type.65f120.1: type = fn_type @C__carbon_thunk.1 [concrete]
  344. // CHECK:STDOUT: %C__carbon_thunk.d98342.1: %C__carbon_thunk.type.65f120.1 = struct_value () [concrete]
  345. // CHECK:STDOUT: %int_123.fff: Core.IntLiteral = int_value 123 [concrete]
  346. // CHECK:STDOUT: %int_456.010: Core.IntLiteral = int_value 456 [concrete]
  347. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  348. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  349. // CHECK:STDOUT: %C__carbon_thunk.type.65f120.2: type = fn_type @C__carbon_thunk.2 [concrete]
  350. // CHECK:STDOUT: %C__carbon_thunk.d98342.2: %C__carbon_thunk.type.65f120.2 = struct_value () [concrete]
  351. // CHECK:STDOUT: %ImplicitAs.type.d14: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  352. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  353. // CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
  354. // 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]
  355. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.1c0: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.340 = struct_value () [symbolic]
  356. // CHECK:STDOUT: %ImplicitAs.impl_witness.204: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.9e9, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  357. // 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]
  358. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.584 = struct_value () [concrete]
  359. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.d14 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.204) [concrete]
  360. // CHECK:STDOUT: %.1df: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete]
  361. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.0c9: <bound method> = bound_method %int_123.fff, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  362. // 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]
  363. // CHECK:STDOUT: %bound_method.bec: <bound method> = bound_method %int_123.fff, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  364. // CHECK:STDOUT: %int_123.f7f: %i32 = int_value 123 [concrete]
  365. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.ec6: <bound method> = bound_method %int_456.010, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  366. // CHECK:STDOUT: %bound_method.ed0: <bound method> = bound_method %int_456.010, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  367. // CHECK:STDOUT: %int_456.d17: %i32 = int_value 456 [concrete]
  368. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanAggregateDestroy>> [concrete]
  369. // CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete]
  370. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete]
  371. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete]
  372. // CHECK:STDOUT: }
  373. // CHECK:STDOUT:
  374. // CHECK:STDOUT: imports {
  375. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  376. // CHECK:STDOUT: .C = %C.decl
  377. // CHECK:STDOUT: import Cpp//...
  378. // CHECK:STDOUT: }
  379. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  380. // CHECK:STDOUT: %.40b: %.d40 = cpp_overload_set_value @C.C.1 [concrete = constants.%empty_struct]
  381. // CHECK:STDOUT: %C__carbon_thunk.decl.8acdfe.1: %C__carbon_thunk.type.65f120.1 = fn_decl @C__carbon_thunk.1 [concrete = constants.%C__carbon_thunk.d98342.1] {
  382. // CHECK:STDOUT: <elided>
  383. // CHECK:STDOUT: } {
  384. // CHECK:STDOUT: <elided>
  385. // CHECK:STDOUT: }
  386. // CHECK:STDOUT: %C__carbon_thunk.decl.8acdfe.2: %C__carbon_thunk.type.65f120.2 = fn_decl @C__carbon_thunk.2 [concrete = constants.%C__carbon_thunk.d98342.2] {
  387. // CHECK:STDOUT: <elided>
  388. // CHECK:STDOUT: } {
  389. // CHECK:STDOUT: <elided>
  390. // CHECK:STDOUT: }
  391. // 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)]
  392. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.9e9 = impl_witness_table (%Core.import_ref.ee7), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  393. // CHECK:STDOUT: }
  394. // CHECK:STDOUT:
  395. // CHECK:STDOUT: fn @F() {
  396. // CHECK:STDOUT: !entry:
  397. // CHECK:STDOUT: name_binding_decl {
  398. // CHECK:STDOUT: %c1.patt: %pattern_type.217 = binding_pattern c1 [concrete]
  399. // CHECK:STDOUT: }
  400. // CHECK:STDOUT: %Cpp.ref.loc8_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  401. // CHECK:STDOUT: %C.ref.loc8_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  402. // CHECK:STDOUT: %C.ref.loc8_24: %.d40 = name_ref C, imports.%.40b [concrete = constants.%empty_struct]
  403. // CHECK:STDOUT: %.loc8_27.1: ref %C = temporary_storage
  404. // CHECK:STDOUT: %addr.loc8_27.1: %ptr.d9e = addr_of %.loc8_27.1
  405. // CHECK:STDOUT: %C__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%C__carbon_thunk.decl.8acdfe.1(%addr.loc8_27.1)
  406. // CHECK:STDOUT: %.loc8_27.2: init %C = in_place_init %C__carbon_thunk.call.loc8, %.loc8_27.1
  407. // CHECK:STDOUT: %.loc8_14: type = splice_block %C.ref.loc8_14 [concrete = constants.%C] {
  408. // CHECK:STDOUT: %Cpp.ref.loc8_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  409. // CHECK:STDOUT: %C.ref.loc8_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  410. // CHECK:STDOUT: }
  411. // CHECK:STDOUT: %.loc8_27.3: ref %C = temporary %.loc8_27.1, %.loc8_27.2
  412. // CHECK:STDOUT: %.loc8_27.4: %C = bind_value %.loc8_27.3
  413. // CHECK:STDOUT: %c1: %C = bind_name c1, %.loc8_27.4
  414. // CHECK:STDOUT: name_binding_decl {
  415. // CHECK:STDOUT: %c2.patt: %pattern_type.217 = binding_pattern c2 [concrete]
  416. // CHECK:STDOUT: }
  417. // CHECK:STDOUT: %Cpp.ref.loc9_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  418. // CHECK:STDOUT: %C.ref.loc9_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  419. // CHECK:STDOUT: %C.ref.loc9_24: %.d40 = name_ref C, imports.%.40b [concrete = constants.%empty_struct]
  420. // CHECK:STDOUT: %int_123: Core.IntLiteral = int_value 123 [concrete = constants.%int_123.fff]
  421. // CHECK:STDOUT: %int_456: Core.IntLiteral = int_value 456 [concrete = constants.%int_456.010]
  422. // CHECK:STDOUT: %.loc9_35.1: ref %C = temporary_storage
  423. // CHECK:STDOUT: %impl.elem0.loc9_27: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  424. // CHECK:STDOUT: %bound_method.loc9_27.1: <bound method> = bound_method %int_123, %impl.elem0.loc9_27 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.0c9]
  425. // CHECK:STDOUT: %specific_fn.loc9_27: <specific function> = specific_function %impl.elem0.loc9_27, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  426. // CHECK:STDOUT: %bound_method.loc9_27.2: <bound method> = bound_method %int_123, %specific_fn.loc9_27 [concrete = constants.%bound_method.bec]
  427. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_27: init %i32 = call %bound_method.loc9_27.2(%int_123) [concrete = constants.%int_123.f7f]
  428. // CHECK:STDOUT: %.loc9_27.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_27 [concrete = constants.%int_123.f7f]
  429. // CHECK:STDOUT: %.loc9_27.2: %i32 = converted %int_123, %.loc9_27.1 [concrete = constants.%int_123.f7f]
  430. // CHECK:STDOUT: %impl.elem0.loc9_32: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  431. // CHECK:STDOUT: %bound_method.loc9_32.1: <bound method> = bound_method %int_456, %impl.elem0.loc9_32 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.ec6]
  432. // CHECK:STDOUT: %specific_fn.loc9_32: <specific function> = specific_function %impl.elem0.loc9_32, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  433. // CHECK:STDOUT: %bound_method.loc9_32.2: <bound method> = bound_method %int_456, %specific_fn.loc9_32 [concrete = constants.%bound_method.ed0]
  434. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_32: init %i32 = call %bound_method.loc9_32.2(%int_456) [concrete = constants.%int_456.d17]
  435. // CHECK:STDOUT: %.loc9_32.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_32 [concrete = constants.%int_456.d17]
  436. // CHECK:STDOUT: %.loc9_32.2: %i32 = converted %int_456, %.loc9_32.1 [concrete = constants.%int_456.d17]
  437. // CHECK:STDOUT: %addr.loc9_35.1: %ptr.d9e = addr_of %.loc9_35.1
  438. // CHECK:STDOUT: %C__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%C__carbon_thunk.decl.8acdfe.2(%.loc9_27.2, %.loc9_32.2, %addr.loc9_35.1)
  439. // CHECK:STDOUT: %.loc9_35.2: init %C = in_place_init %C__carbon_thunk.call.loc9, %.loc9_35.1
  440. // CHECK:STDOUT: %.loc9_14: type = splice_block %C.ref.loc9_14 [concrete = constants.%C] {
  441. // CHECK:STDOUT: %Cpp.ref.loc9_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  442. // CHECK:STDOUT: %C.ref.loc9_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  443. // CHECK:STDOUT: }
  444. // CHECK:STDOUT: %.loc9_35.3: ref %C = temporary %.loc9_35.1, %.loc9_35.2
  445. // CHECK:STDOUT: %.loc9_35.4: %C = bind_value %.loc9_35.3
  446. // CHECK:STDOUT: %c2: %C = bind_name c2, %.loc9_35.4
  447. // CHECK:STDOUT: %facet_value.loc9: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  448. // CHECK:STDOUT: %.loc9_35.5: %type_where = converted constants.%C, %facet_value.loc9 [concrete = constants.%facet_value]
  449. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc9: <bound method> = bound_method %.loc9_35.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  450. // CHECK:STDOUT: <elided>
  451. // CHECK:STDOUT: %bound_method.loc9_35: <bound method> = bound_method %.loc9_35.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.1
  452. // CHECK:STDOUT: %addr.loc9_35.2: %ptr.d9e = addr_of %.loc9_35.3
  453. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc9: init %empty_tuple.type = call %bound_method.loc9_35(%addr.loc9_35.2)
  454. // CHECK:STDOUT: %facet_value.loc8: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  455. // CHECK:STDOUT: %.loc8_27.5: %type_where = converted constants.%C, %facet_value.loc8 [concrete = constants.%facet_value]
  456. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound.loc8: <bound method> = bound_method %.loc8_27.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  457. // CHECK:STDOUT: <elided>
  458. // CHECK:STDOUT: %bound_method.loc8: <bound method> = bound_method %.loc8_27.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn.2
  459. // CHECK:STDOUT: %addr.loc8_27.2: %ptr.d9e = addr_of %.loc8_27.3
  460. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%addr.loc8_27.2)
  461. // CHECK:STDOUT: <elided>
  462. // CHECK:STDOUT: }
  463. // CHECK:STDOUT:
  464. // CHECK:STDOUT: --- fail_todo_import_default_values.carbon
  465. // CHECK:STDOUT:
  466. // CHECK:STDOUT: constants {
  467. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  468. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  469. // CHECK:STDOUT: %pattern_type.217: type = pattern_type %C [concrete]
  470. // CHECK:STDOUT: %.d40: type = cpp_overload_set_type @C.C [concrete]
  471. // CHECK:STDOUT: %empty_struct: %.d40 = struct_value () [concrete]
  472. // CHECK:STDOUT: %int_8.b85: Core.IntLiteral = int_value 8 [concrete]
  473. // CHECK:STDOUT: %int_9.988: Core.IntLiteral = int_value 9 [concrete]
  474. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  475. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  476. // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete]
  477. // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete]
  478. // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete]
  479. // CHECK:STDOUT: %ImplicitAs.type.d14: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  480. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  481. // CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
  482. // 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]
  483. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.1c0: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.340 = struct_value () [symbolic]
  484. // CHECK:STDOUT: %ImplicitAs.impl_witness.204: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.9e9, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  485. // 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]
  486. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.584 = struct_value () [concrete]
  487. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.d14 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.204) [concrete]
  488. // CHECK:STDOUT: %.1df: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete]
  489. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.0ab: <bound method> = bound_method %int_8.b85, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  490. // 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]
  491. // CHECK:STDOUT: %bound_method.b23: <bound method> = bound_method %int_8.b85, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  492. // CHECK:STDOUT: %int_8.98c: %i32 = int_value 8 [concrete]
  493. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.36a: <bound method> = bound_method %int_9.988, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  494. // CHECK:STDOUT: %bound_method.942: <bound method> = bound_method %int_9.988, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  495. // CHECK:STDOUT: %int_9.f88: %i32 = int_value 9 [concrete]
  496. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanAggregateDestroy>> [concrete]
  497. // CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete]
  498. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete]
  499. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete]
  500. // CHECK:STDOUT: }
  501. // CHECK:STDOUT:
  502. // CHECK:STDOUT: imports {
  503. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  504. // CHECK:STDOUT: .C = %C.decl
  505. // CHECK:STDOUT: import Cpp//...
  506. // CHECK:STDOUT: }
  507. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  508. // CHECK:STDOUT: %.40b: %.d40 = cpp_overload_set_value @C.C [concrete = constants.%empty_struct]
  509. // CHECK:STDOUT: %C__carbon_thunk.decl: %C__carbon_thunk.type = fn_decl @C__carbon_thunk [concrete = constants.%C__carbon_thunk] {
  510. // CHECK:STDOUT: <elided>
  511. // CHECK:STDOUT: } {
  512. // CHECK:STDOUT: <elided>
  513. // CHECK:STDOUT: }
  514. // 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)]
  515. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.9e9 = impl_witness_table (%Core.import_ref.ee7), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  516. // CHECK:STDOUT: }
  517. // CHECK:STDOUT:
  518. // CHECK:STDOUT: fn @F() {
  519. // CHECK:STDOUT: !entry:
  520. // CHECK:STDOUT: name_binding_decl {
  521. // CHECK:STDOUT: %c1.patt: %pattern_type.217 = binding_pattern c1 [concrete]
  522. // CHECK:STDOUT: }
  523. // CHECK:STDOUT: %Cpp.ref.loc8_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  524. // CHECK:STDOUT: %C.ref.loc8_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  525. // CHECK:STDOUT: %C.ref.loc8_24: %.d40 = name_ref C, imports.%.40b [concrete = constants.%empty_struct]
  526. // CHECK:STDOUT: %int_8.loc8: Core.IntLiteral = int_value 8 [concrete = constants.%int_8.b85]
  527. // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9.988]
  528. // CHECK:STDOUT: %.loc8_31.1: ref %C = temporary_storage
  529. // CHECK:STDOUT: %impl.elem0.loc8_27: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  530. // CHECK:STDOUT: %bound_method.loc8_27.1: <bound method> = bound_method %int_8.loc8, %impl.elem0.loc8_27 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.0ab]
  531. // CHECK:STDOUT: %specific_fn.loc8_27: <specific function> = specific_function %impl.elem0.loc8_27, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  532. // CHECK:STDOUT: %bound_method.loc8_27.2: <bound method> = bound_method %int_8.loc8, %specific_fn.loc8_27 [concrete = constants.%bound_method.b23]
  533. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_27: init %i32 = call %bound_method.loc8_27.2(%int_8.loc8) [concrete = constants.%int_8.98c]
  534. // CHECK:STDOUT: %.loc8_27.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_27 [concrete = constants.%int_8.98c]
  535. // CHECK:STDOUT: %.loc8_27.2: %i32 = converted %int_8.loc8, %.loc8_27.1 [concrete = constants.%int_8.98c]
  536. // CHECK:STDOUT: %impl.elem0.loc8_30: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  537. // CHECK:STDOUT: %bound_method.loc8_30.1: <bound method> = bound_method %int_9, %impl.elem0.loc8_30 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.36a]
  538. // CHECK:STDOUT: %specific_fn.loc8_30: <specific function> = specific_function %impl.elem0.loc8_30, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  539. // CHECK:STDOUT: %bound_method.loc8_30.2: <bound method> = bound_method %int_9, %specific_fn.loc8_30 [concrete = constants.%bound_method.942]
  540. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_30: init %i32 = call %bound_method.loc8_30.2(%int_9) [concrete = constants.%int_9.f88]
  541. // CHECK:STDOUT: %.loc8_30.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_30 [concrete = constants.%int_9.f88]
  542. // CHECK:STDOUT: %.loc8_30.2: %i32 = converted %int_9, %.loc8_30.1 [concrete = constants.%int_9.f88]
  543. // CHECK:STDOUT: %addr.loc8_31.1: %ptr.d9e = addr_of %.loc8_31.1
  544. // CHECK:STDOUT: %C__carbon_thunk.call: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%.loc8_27.2, %.loc8_30.2, %addr.loc8_31.1)
  545. // CHECK:STDOUT: %.loc8_31.2: init %C = in_place_init %C__carbon_thunk.call, %.loc8_31.1
  546. // CHECK:STDOUT: %.loc8_14: type = splice_block %C.ref.loc8_14 [concrete = constants.%C] {
  547. // CHECK:STDOUT: %Cpp.ref.loc8_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  548. // CHECK:STDOUT: %C.ref.loc8_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  549. // CHECK:STDOUT: }
  550. // CHECK:STDOUT: %.loc8_31.3: ref %C = temporary %.loc8_31.1, %.loc8_31.2
  551. // CHECK:STDOUT: %.loc8_31.4: %C = bind_value %.loc8_31.3
  552. // CHECK:STDOUT: %c1: %C = bind_name c1, %.loc8_31.4
  553. // CHECK:STDOUT: name_binding_decl {
  554. // CHECK:STDOUT: %c2.patt: %pattern_type.217 = binding_pattern c2 [concrete]
  555. // CHECK:STDOUT: }
  556. // CHECK:STDOUT: %Cpp.ref.loc14_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  557. // CHECK:STDOUT: %C.ref.loc14_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  558. // CHECK:STDOUT: %C.ref.loc14_24: %.d40 = name_ref C, imports.%.40b [concrete = constants.%empty_struct]
  559. // CHECK:STDOUT: %int_8.loc14: Core.IntLiteral = int_value 8 [concrete = constants.%int_8.b85]
  560. // CHECK:STDOUT: %.loc14: type = splice_block %C.ref.loc14_14 [concrete = constants.%C] {
  561. // CHECK:STDOUT: %Cpp.ref.loc14_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  562. // CHECK:STDOUT: %C.ref.loc14_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  563. // CHECK:STDOUT: }
  564. // CHECK:STDOUT: %c2: %C = bind_name c2, <error> [concrete = <error>]
  565. // CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  566. // CHECK:STDOUT: %.loc8_31.5: %type_where = converted constants.%C, %facet_value [concrete = constants.%facet_value]
  567. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc8_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  568. // CHECK:STDOUT: <elided>
  569. // CHECK:STDOUT: %bound_method.loc8_31: <bound method> = bound_method %.loc8_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn
  570. // CHECK:STDOUT: %addr.loc8_31.2: %ptr.d9e = addr_of %.loc8_31.3
  571. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc8_31(%addr.loc8_31.2)
  572. // CHECK:STDOUT: <elided>
  573. // CHECK:STDOUT: }
  574. // CHECK:STDOUT:
  575. // CHECK:STDOUT: --- fail_todo_import_implicit_single_argument.carbon
  576. // CHECK:STDOUT:
  577. // CHECK:STDOUT: constants {
  578. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  579. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  580. // CHECK:STDOUT: %pattern_type.217: type = pattern_type %C [concrete]
  581. // CHECK:STDOUT: %.d40: type = cpp_overload_set_type @C.C [concrete]
  582. // CHECK:STDOUT: %empty_struct: %.d40 = struct_value () [concrete]
  583. // CHECK:STDOUT: %int_8.b85: Core.IntLiteral = int_value 8 [concrete]
  584. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  585. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  586. // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete]
  587. // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete]
  588. // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete]
  589. // CHECK:STDOUT: %ImplicitAs.type.d14: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  590. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  591. // CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
  592. // 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]
  593. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.1c0: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.340 = struct_value () [symbolic]
  594. // CHECK:STDOUT: %ImplicitAs.impl_witness.204: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.9e9, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  595. // 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]
  596. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.584 = struct_value () [concrete]
  597. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.d14 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.204) [concrete]
  598. // CHECK:STDOUT: %.1df: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete]
  599. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_8.b85, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  600. // 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]
  601. // CHECK:STDOUT: %bound_method.b23: <bound method> = bound_method %int_8.b85, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  602. // CHECK:STDOUT: %int_8.98c: %i32 = int_value 8 [concrete]
  603. // CHECK:STDOUT: %As.type.dbd: type = facet_type <@As, @As(%i32)> [concrete]
  604. // CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete]
  605. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.565: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic]
  606. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.d2c: %Core.IntLiteral.as.As.impl.Convert.type.565 = struct_value () [symbolic]
  607. // CHECK:STDOUT: %As.impl_witness.080: <witness> = impl_witness imports.%As.impl_witness_table.5ad, @Core.IntLiteral.as.As.impl(%int_32) [concrete]
  608. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.aaf: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_32) [concrete]
  609. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.414: %Core.IntLiteral.as.As.impl.Convert.type.aaf = struct_value () [concrete]
  610. // CHECK:STDOUT: %As.facet: %As.type.dbd = facet_value Core.IntLiteral, (%As.impl_witness.080) [concrete]
  611. // CHECK:STDOUT: %.351: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet [concrete]
  612. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_8.b85, %Core.IntLiteral.as.As.impl.Convert.414 [concrete]
  613. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.414, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete]
  614. // CHECK:STDOUT: %bound_method.80c: <bound method> = bound_method %int_8.b85, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
  615. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanAggregateDestroy>> [concrete]
  616. // CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete]
  617. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete]
  618. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete]
  619. // CHECK:STDOUT: }
  620. // CHECK:STDOUT:
  621. // CHECK:STDOUT: imports {
  622. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  623. // CHECK:STDOUT: .C = %C.decl
  624. // CHECK:STDOUT: import Cpp//...
  625. // CHECK:STDOUT: }
  626. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  627. // CHECK:STDOUT: %.40b: %.d40 = cpp_overload_set_value @C.C [concrete = constants.%empty_struct]
  628. // CHECK:STDOUT: %C__carbon_thunk.decl: %C__carbon_thunk.type = fn_decl @C__carbon_thunk [concrete = constants.%C__carbon_thunk] {
  629. // CHECK:STDOUT: <elided>
  630. // CHECK:STDOUT: } {
  631. // CHECK:STDOUT: <elided>
  632. // CHECK:STDOUT: }
  633. // 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)]
  634. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.9e9 = impl_witness_table (%Core.import_ref.ee7), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  635. // CHECK:STDOUT: %Core.import_ref.99c: @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.565) = import_ref Core//prelude/parts/int, loc32_39, loaded [symbolic = @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.d2c)]
  636. // CHECK:STDOUT: %As.impl_witness_table.5ad = impl_witness_table (%Core.import_ref.99c), @Core.IntLiteral.as.As.impl [concrete]
  637. // CHECK:STDOUT: }
  638. // CHECK:STDOUT:
  639. // CHECK:STDOUT: fn @F() {
  640. // CHECK:STDOUT: !entry:
  641. // CHECK:STDOUT: name_binding_decl {
  642. // CHECK:STDOUT: %c1.patt: %pattern_type.217 = binding_pattern c1 [concrete]
  643. // CHECK:STDOUT: }
  644. // CHECK:STDOUT: %Cpp.ref.loc8_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  645. // CHECK:STDOUT: %C.ref.loc8_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  646. // CHECK:STDOUT: %C.ref.loc8_24: %.d40 = name_ref C, imports.%.40b [concrete = constants.%empty_struct]
  647. // CHECK:STDOUT: %int_8.loc8: Core.IntLiteral = int_value 8 [concrete = constants.%int_8.b85]
  648. // CHECK:STDOUT: %.loc8_28.1: ref %C = temporary_storage
  649. // CHECK:STDOUT: %impl.elem0.loc8: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  650. // CHECK:STDOUT: %bound_method.loc8_27.1: <bound method> = bound_method %int_8.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  651. // CHECK:STDOUT: %specific_fn.loc8: <specific function> = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  652. // CHECK:STDOUT: %bound_method.loc8_27.2: <bound method> = bound_method %int_8.loc8, %specific_fn.loc8 [concrete = constants.%bound_method.b23]
  653. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc8_27.2(%int_8.loc8) [concrete = constants.%int_8.98c]
  654. // CHECK:STDOUT: %.loc8_27.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_8.98c]
  655. // CHECK:STDOUT: %.loc8_27.2: %i32 = converted %int_8.loc8, %.loc8_27.1 [concrete = constants.%int_8.98c]
  656. // CHECK:STDOUT: %addr.loc8_28.1: %ptr.d9e = addr_of %.loc8_28.1
  657. // CHECK:STDOUT: %C__carbon_thunk.call: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%.loc8_27.2, %addr.loc8_28.1)
  658. // CHECK:STDOUT: %.loc8_28.2: init %C = in_place_init %C__carbon_thunk.call, %.loc8_28.1
  659. // CHECK:STDOUT: %.loc8_14: type = splice_block %C.ref.loc8_14 [concrete = constants.%C] {
  660. // CHECK:STDOUT: %Cpp.ref.loc8_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  661. // CHECK:STDOUT: %C.ref.loc8_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  662. // CHECK:STDOUT: }
  663. // CHECK:STDOUT: %.loc8_28.3: ref %C = temporary %.loc8_28.1, %.loc8_28.2
  664. // CHECK:STDOUT: %.loc8_28.4: %C = bind_value %.loc8_28.3
  665. // CHECK:STDOUT: %c1: %C = bind_name c1, %.loc8_28.4
  666. // CHECK:STDOUT: name_binding_decl {
  667. // CHECK:STDOUT: %c2.patt: %pattern_type.217 = binding_pattern c2 [concrete]
  668. // CHECK:STDOUT: }
  669. // CHECK:STDOUT: %int_8.loc16: Core.IntLiteral = int_value 8 [concrete = constants.%int_8.b85]
  670. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  671. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  672. // CHECK:STDOUT: %impl.elem0.loc16: %.351 = impl_witness_access constants.%As.impl_witness.080, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.414]
  673. // CHECK:STDOUT: %bound_method.loc16_21.1: <bound method> = bound_method %int_8.loc16, %impl.elem0.loc16 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
  674. // CHECK:STDOUT: %specific_fn.loc16: <specific function> = specific_function %impl.elem0.loc16, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
  675. // CHECK:STDOUT: %bound_method.loc16_21.2: <bound method> = bound_method %int_8.loc16, %specific_fn.loc16 [concrete = constants.%bound_method.80c]
  676. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i32 = call %bound_method.loc16_21.2(%int_8.loc16) [concrete = constants.%int_8.98c]
  677. // CHECK:STDOUT: %.loc16_21.1: %i32 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_8.98c]
  678. // CHECK:STDOUT: %.loc16_21.2: %i32 = converted %int_8.loc16, %.loc16_21.1 [concrete = constants.%int_8.98c]
  679. // CHECK:STDOUT: %.loc16_14: type = splice_block %C.ref.loc16 [concrete = constants.%C] {
  680. // CHECK:STDOUT: %Cpp.ref.loc16: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  681. // CHECK:STDOUT: %C.ref.loc16: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  682. // CHECK:STDOUT: }
  683. // CHECK:STDOUT: %.loc16_21.3: %C = converted %.loc16_21.2, <error> [concrete = <error>]
  684. // CHECK:STDOUT: %c2: %C = bind_name c2, <error> [concrete = <error>]
  685. // CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  686. // CHECK:STDOUT: %.loc8_28.5: %type_where = converted constants.%C, %facet_value [concrete = constants.%facet_value]
  687. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc8_28.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  688. // CHECK:STDOUT: <elided>
  689. // CHECK:STDOUT: %bound_method.loc8_28: <bound method> = bound_method %.loc8_28.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn
  690. // CHECK:STDOUT: %addr.loc8_28.2: %ptr.d9e = addr_of %.loc8_28.3
  691. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc8_28(%addr.loc8_28.2)
  692. // CHECK:STDOUT: <elided>
  693. // CHECK:STDOUT: }
  694. // CHECK:STDOUT:
  695. // CHECK:STDOUT: --- fail_todo_import_implicit_multi_arguments.carbon
  696. // CHECK:STDOUT:
  697. // CHECK:STDOUT: constants {
  698. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  699. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  700. // CHECK:STDOUT: %pattern_type.217: type = pattern_type %C [concrete]
  701. // CHECK:STDOUT: %.d40: type = cpp_overload_set_type @C.C [concrete]
  702. // CHECK:STDOUT: %empty_struct: %.d40 = struct_value () [concrete]
  703. // CHECK:STDOUT: %int_8.b85: Core.IntLiteral = int_value 8 [concrete]
  704. // CHECK:STDOUT: %int_9.988: Core.IntLiteral = int_value 9 [concrete]
  705. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  706. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  707. // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete]
  708. // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete]
  709. // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete]
  710. // CHECK:STDOUT: %ImplicitAs.type.d14: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  711. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  712. // CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
  713. // 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]
  714. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.1c0: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.340 = struct_value () [symbolic]
  715. // CHECK:STDOUT: %ImplicitAs.impl_witness.204: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.9e9, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  716. // 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]
  717. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.584 = struct_value () [concrete]
  718. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.d14 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.204) [concrete]
  719. // CHECK:STDOUT: %.1df: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete]
  720. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.0ab: <bound method> = bound_method %int_8.b85, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  721. // 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]
  722. // CHECK:STDOUT: %bound_method.b23: <bound method> = bound_method %int_8.b85, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  723. // CHECK:STDOUT: %int_8.98c: %i32 = int_value 8 [concrete]
  724. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.36a: <bound method> = bound_method %int_9.988, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  725. // CHECK:STDOUT: %bound_method.942: <bound method> = bound_method %int_9.988, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  726. // CHECK:STDOUT: %int_9.f88: %i32 = int_value 9 [concrete]
  727. // CHECK:STDOUT: %As.type.dbd: type = facet_type <@As, @As(%i32)> [concrete]
  728. // CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete]
  729. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.565: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic]
  730. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.d2c: %Core.IntLiteral.as.As.impl.Convert.type.565 = struct_value () [symbolic]
  731. // CHECK:STDOUT: %As.impl_witness.080: <witness> = impl_witness imports.%As.impl_witness_table.5ad, @Core.IntLiteral.as.As.impl(%int_32) [concrete]
  732. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.aaf: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_32) [concrete]
  733. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.414: %Core.IntLiteral.as.As.impl.Convert.type.aaf = struct_value () [concrete]
  734. // CHECK:STDOUT: %As.facet: %As.type.dbd = facet_value Core.IntLiteral, (%As.impl_witness.080) [concrete]
  735. // CHECK:STDOUT: %.351: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet [concrete]
  736. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_8.b85, %Core.IntLiteral.as.As.impl.Convert.414 [concrete]
  737. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.414, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete]
  738. // CHECK:STDOUT: %bound_method.80c: <bound method> = bound_method %int_8.b85, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
  739. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanAggregateDestroy>> [concrete]
  740. // CHECK:STDOUT: %facet_value: %type_where = facet_value %C, () [concrete]
  741. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1: type = fn_type @AggregateT.as_type.as.Destroy.impl.Op, @AggregateT.as_type.as.Destroy.impl(%facet_value) [concrete]
  742. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.6b9: %AggregateT.as_type.as.Destroy.impl.Op.type.fc1 = struct_value () [concrete]
  743. // CHECK:STDOUT: }
  744. // CHECK:STDOUT:
  745. // CHECK:STDOUT: imports {
  746. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  747. // CHECK:STDOUT: .C = %C.decl
  748. // CHECK:STDOUT: import Cpp//...
  749. // CHECK:STDOUT: }
  750. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  751. // CHECK:STDOUT: %.40b: %.d40 = cpp_overload_set_value @C.C [concrete = constants.%empty_struct]
  752. // CHECK:STDOUT: %C__carbon_thunk.decl: %C__carbon_thunk.type = fn_decl @C__carbon_thunk [concrete = constants.%C__carbon_thunk] {
  753. // CHECK:STDOUT: <elided>
  754. // CHECK:STDOUT: } {
  755. // CHECK:STDOUT: <elided>
  756. // CHECK:STDOUT: }
  757. // 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)]
  758. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.9e9 = impl_witness_table (%Core.import_ref.ee7), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  759. // CHECK:STDOUT: %Core.import_ref.99c: @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.565) = import_ref Core//prelude/parts/int, loc32_39, loaded [symbolic = @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.d2c)]
  760. // CHECK:STDOUT: %As.impl_witness_table.5ad = impl_witness_table (%Core.import_ref.99c), @Core.IntLiteral.as.As.impl [concrete]
  761. // CHECK:STDOUT: }
  762. // CHECK:STDOUT:
  763. // CHECK:STDOUT: fn @F() {
  764. // CHECK:STDOUT: !entry:
  765. // CHECK:STDOUT: name_binding_decl {
  766. // CHECK:STDOUT: %c1.patt: %pattern_type.217 = binding_pattern c1 [concrete]
  767. // CHECK:STDOUT: }
  768. // CHECK:STDOUT: %Cpp.ref.loc8_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  769. // CHECK:STDOUT: %C.ref.loc8_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  770. // CHECK:STDOUT: %C.ref.loc8_24: %.d40 = name_ref C, imports.%.40b [concrete = constants.%empty_struct]
  771. // CHECK:STDOUT: %int_8.loc8: Core.IntLiteral = int_value 8 [concrete = constants.%int_8.b85]
  772. // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9.988]
  773. // CHECK:STDOUT: %.loc8_31.1: ref %C = temporary_storage
  774. // CHECK:STDOUT: %impl.elem0.loc8_27: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  775. // CHECK:STDOUT: %bound_method.loc8_27.1: <bound method> = bound_method %int_8.loc8, %impl.elem0.loc8_27 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.0ab]
  776. // CHECK:STDOUT: %specific_fn.loc8_27: <specific function> = specific_function %impl.elem0.loc8_27, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  777. // CHECK:STDOUT: %bound_method.loc8_27.2: <bound method> = bound_method %int_8.loc8, %specific_fn.loc8_27 [concrete = constants.%bound_method.b23]
  778. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_27: init %i32 = call %bound_method.loc8_27.2(%int_8.loc8) [concrete = constants.%int_8.98c]
  779. // CHECK:STDOUT: %.loc8_27.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_27 [concrete = constants.%int_8.98c]
  780. // CHECK:STDOUT: %.loc8_27.2: %i32 = converted %int_8.loc8, %.loc8_27.1 [concrete = constants.%int_8.98c]
  781. // CHECK:STDOUT: %impl.elem0.loc8_30: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  782. // CHECK:STDOUT: %bound_method.loc8_30.1: <bound method> = bound_method %int_9, %impl.elem0.loc8_30 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.36a]
  783. // CHECK:STDOUT: %specific_fn.loc8_30: <specific function> = specific_function %impl.elem0.loc8_30, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  784. // CHECK:STDOUT: %bound_method.loc8_30.2: <bound method> = bound_method %int_9, %specific_fn.loc8_30 [concrete = constants.%bound_method.942]
  785. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_30: init %i32 = call %bound_method.loc8_30.2(%int_9) [concrete = constants.%int_9.f88]
  786. // CHECK:STDOUT: %.loc8_30.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_30 [concrete = constants.%int_9.f88]
  787. // CHECK:STDOUT: %.loc8_30.2: %i32 = converted %int_9, %.loc8_30.1 [concrete = constants.%int_9.f88]
  788. // CHECK:STDOUT: %addr.loc8_31.1: %ptr.d9e = addr_of %.loc8_31.1
  789. // CHECK:STDOUT: %C__carbon_thunk.call: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%.loc8_27.2, %.loc8_30.2, %addr.loc8_31.1)
  790. // CHECK:STDOUT: %.loc8_31.2: init %C = in_place_init %C__carbon_thunk.call, %.loc8_31.1
  791. // CHECK:STDOUT: %.loc8_14: type = splice_block %C.ref.loc8_14 [concrete = constants.%C] {
  792. // CHECK:STDOUT: %Cpp.ref.loc8_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  793. // CHECK:STDOUT: %C.ref.loc8_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  794. // CHECK:STDOUT: }
  795. // CHECK:STDOUT: %.loc8_31.3: ref %C = temporary %.loc8_31.1, %.loc8_31.2
  796. // CHECK:STDOUT: %.loc8_31.4: %C = bind_value %.loc8_31.3
  797. // CHECK:STDOUT: %c1: %C = bind_name c1, %.loc8_31.4
  798. // CHECK:STDOUT: name_binding_decl {
  799. // CHECK:STDOUT: %c2.patt: %pattern_type.217 = binding_pattern c2 [concrete]
  800. // CHECK:STDOUT: }
  801. // CHECK:STDOUT: %Cpp.ref.loc14_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  802. // CHECK:STDOUT: %C.ref.loc14_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  803. // CHECK:STDOUT: %C.ref.loc14_24: %.d40 = name_ref C, imports.%.40b [concrete = constants.%empty_struct]
  804. // CHECK:STDOUT: %int_8.loc14: Core.IntLiteral = int_value 8 [concrete = constants.%int_8.b85]
  805. // CHECK:STDOUT: %.loc14: type = splice_block %C.ref.loc14_14 [concrete = constants.%C] {
  806. // CHECK:STDOUT: %Cpp.ref.loc14_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  807. // CHECK:STDOUT: %C.ref.loc14_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  808. // CHECK:STDOUT: }
  809. // CHECK:STDOUT: %c2: %C = bind_name c2, <error> [concrete = <error>]
  810. // CHECK:STDOUT: name_binding_decl {
  811. // CHECK:STDOUT: %c3.patt: %pattern_type.217 = binding_pattern c3 [concrete]
  812. // CHECK:STDOUT: }
  813. // CHECK:STDOUT: %int_8.loc22: Core.IntLiteral = int_value 8 [concrete = constants.%int_8.b85]
  814. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  815. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  816. // CHECK:STDOUT: %impl.elem0.loc22: %.351 = impl_witness_access constants.%As.impl_witness.080, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.414]
  817. // CHECK:STDOUT: %bound_method.loc22_21.1: <bound method> = bound_method %int_8.loc22, %impl.elem0.loc22 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
  818. // CHECK:STDOUT: %specific_fn.loc22: <specific function> = specific_function %impl.elem0.loc22, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
  819. // CHECK:STDOUT: %bound_method.loc22_21.2: <bound method> = bound_method %int_8.loc22, %specific_fn.loc22 [concrete = constants.%bound_method.80c]
  820. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i32 = call %bound_method.loc22_21.2(%int_8.loc22) [concrete = constants.%int_8.98c]
  821. // CHECK:STDOUT: %.loc22_21.1: %i32 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_8.98c]
  822. // CHECK:STDOUT: %.loc22_21.2: %i32 = converted %int_8.loc22, %.loc22_21.1 [concrete = constants.%int_8.98c]
  823. // CHECK:STDOUT: %.loc22_14: type = splice_block %C.ref.loc22 [concrete = constants.%C] {
  824. // CHECK:STDOUT: %Cpp.ref.loc22: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  825. // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
  826. // CHECK:STDOUT: }
  827. // CHECK:STDOUT: %.loc22_21.3: %C = converted %.loc22_21.2, <error> [concrete = <error>]
  828. // CHECK:STDOUT: %c3: %C = bind_name c3, <error> [concrete = <error>]
  829. // CHECK:STDOUT: %facet_value: %type_where = facet_value constants.%C, () [concrete = constants.%facet_value]
  830. // CHECK:STDOUT: %.loc8_31.5: %type_where = converted constants.%C, %facet_value [concrete = constants.%facet_value]
  831. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.bound: <bound method> = bound_method %.loc8_31.3, constants.%AggregateT.as_type.as.Destroy.impl.Op.6b9
  832. // CHECK:STDOUT: <elided>
  833. // CHECK:STDOUT: %bound_method.loc8_31: <bound method> = bound_method %.loc8_31.3, %AggregateT.as_type.as.Destroy.impl.Op.specific_fn
  834. // CHECK:STDOUT: %addr.loc8_31.2: %ptr.d9e = addr_of %.loc8_31.3
  835. // CHECK:STDOUT: %AggregateT.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc8_31(%addr.loc8_31.2)
  836. // CHECK:STDOUT: <elided>
  837. // CHECK:STDOUT: }
  838. // CHECK:STDOUT: