method.carbon 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // AUTOUPDATE
  6. // TIP: To test this file alone, run:
  7. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/function/builtin/method.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/builtin/method.carbon
  10. interface I {
  11. fn F[self: Self](other: Self) -> Self;
  12. }
  13. impl i32 as I {
  14. fn F[self: i32](other: i32) -> i32 = "int.sadd";
  15. }
  16. var arr: array(i32, (1 as i32).(I.F)(2));
  17. // CHECK:STDOUT: --- method.carbon
  18. // CHECK:STDOUT:
  19. // CHECK:STDOUT: constants {
  20. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  21. // CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
  22. // CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.826 [symbolic]
  23. // CHECK:STDOUT: %F.type.cf0: type = fn_type @F.1 [concrete]
  24. // CHECK:STDOUT: %F.bc6: %F.type.cf0 = struct_value () [concrete]
  25. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type %I.type [concrete]
  26. // CHECK:STDOUT: %assoc0.a5e: %I.assoc_type = assoc_entity element0, @I.%F.decl [concrete]
  27. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  28. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  29. // CHECK:STDOUT: %impl_witness.da7: <witness> = impl_witness (@impl.a9a.%F.decl) [concrete]
  30. // CHECK:STDOUT: %F.type.066: type = fn_type @F.2 [concrete]
  31. // CHECK:STDOUT: %F.9ec: %F.type.066 = struct_value () [concrete]
  32. // CHECK:STDOUT: %I.facet: %I.type = facet_value %i32, %impl_witness.da7 [concrete]
  33. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  34. // CHECK:STDOUT: %As.type.fd4: type = facet_type <@As, @As(%i32)> [concrete]
  35. // CHECK:STDOUT: %Convert.type.99b: type = fn_type @Convert.1, @As(%i32) [concrete]
  36. // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  37. // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.2, @ImplicitAs(Core.IntLiteral) [concrete]
  38. // CHECK:STDOUT: %impl_witness.882: <witness> = impl_witness (imports.%Core.import_ref.78a), @impl.686(%int_32) [concrete]
  39. // CHECK:STDOUT: %Convert.type.4fd: type = fn_type @Convert.5, @impl.686(%int_32) [concrete]
  40. // CHECK:STDOUT: %Convert.197: %Convert.type.4fd = struct_value () [concrete]
  41. // CHECK:STDOUT: %As.facet: %As.type.fd4 = facet_value Core.IntLiteral, %impl_witness.882 [concrete]
  42. // CHECK:STDOUT: %.214: type = fn_type_with_self_type %Convert.type.99b, %As.facet [concrete]
  43. // CHECK:STDOUT: %Convert.bound.c1b: <bound method> = bound_method %int_1.5b8, %Convert.197 [concrete]
  44. // CHECK:STDOUT: %Convert.specific_fn.f9a: <specific function> = specific_function %Convert.bound.c1b, @Convert.5(%int_32) [concrete]
  45. // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete]
  46. // CHECK:STDOUT: %.c3e: type = fn_type_with_self_type %F.type.cf0, %I.facet [concrete]
  47. // CHECK:STDOUT: %F.bound: <bound method> = bound_method %int_1.5d2, %F.9ec [concrete]
  48. // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete]
  49. // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  50. // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.2, @ImplicitAs(%i32) [concrete]
  51. // CHECK:STDOUT: %impl_witness.d39: <witness> = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete]
  52. // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3, @impl.4f9(%int_32) [concrete]
  53. // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete]
  54. // CHECK:STDOUT: %ImplicitAs.facet.f7f: %ImplicitAs.type.205 = facet_value Core.IntLiteral, %impl_witness.d39 [concrete]
  55. // CHECK:STDOUT: %.a0b: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.f7f [concrete]
  56. // CHECK:STDOUT: %Convert.bound.ef9: <bound method> = bound_method %int_2.ecc, %Convert.956 [concrete]
  57. // CHECK:STDOUT: %Convert.specific_fn.787: <specific function> = specific_function %Convert.bound.ef9, @Convert.3(%int_32) [concrete]
  58. // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete]
  59. // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete]
  60. // CHECK:STDOUT: %impl_witness.023: <witness> = impl_witness (imports.%Core.import_ref.85c), @impl.971(%int_32) [concrete]
  61. // CHECK:STDOUT: %Convert.type.4ad: type = fn_type @Convert.4, @impl.971(%int_32) [concrete]
  62. // CHECK:STDOUT: %Convert.960: %Convert.type.4ad = struct_value () [concrete]
  63. // CHECK:STDOUT: %ImplicitAs.facet.e25: %ImplicitAs.type.2fd = facet_value %i32, %impl_witness.023 [concrete]
  64. // CHECK:STDOUT: %.10e: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.e25 [concrete]
  65. // CHECK:STDOUT: %Convert.bound.2d6: <bound method> = bound_method %int_3.822, %Convert.960 [concrete]
  66. // CHECK:STDOUT: %Convert.specific_fn.377: <specific function> = specific_function %Convert.bound.2d6, @Convert.4(%int_32) [concrete]
  67. // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete]
  68. // CHECK:STDOUT: %array_type: type = array_type %int_3.1ba, %i32 [concrete]
  69. // CHECK:STDOUT: }
  70. // CHECK:STDOUT:
  71. // CHECK:STDOUT: imports {
  72. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  73. // CHECK:STDOUT: .Int = %Core.Int
  74. // CHECK:STDOUT: .As = %Core.As
  75. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  76. // CHECK:STDOUT: import Core//prelude
  77. // CHECK:STDOUT: import Core//prelude/...
  78. // CHECK:STDOUT: }
  79. // CHECK:STDOUT: }
  80. // CHECK:STDOUT:
  81. // CHECK:STDOUT: file {
  82. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  83. // CHECK:STDOUT: .Core = imports.%Core
  84. // CHECK:STDOUT: .I = %I.decl
  85. // CHECK:STDOUT: .arr = %arr
  86. // CHECK:STDOUT: }
  87. // CHECK:STDOUT: %Core.import = import Core
  88. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  89. // CHECK:STDOUT: impl_decl @impl.a9a [concrete] {} {
  90. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  91. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  92. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  93. // CHECK:STDOUT: }
  94. // CHECK:STDOUT: %impl_witness: <witness> = impl_witness (@impl.a9a.%F.decl) [concrete = constants.%impl_witness.da7]
  95. // CHECK:STDOUT: name_binding_decl {
  96. // CHECK:STDOUT: %arr.patt: %array_type = binding_pattern arr
  97. // CHECK:STDOUT: %.loc19_1: %array_type = var_pattern %arr.patt
  98. // CHECK:STDOUT: }
  99. // CHECK:STDOUT: %arr.var: ref %array_type = var arr
  100. // CHECK:STDOUT: %.loc19_40: type = splice_block %array_type [concrete = constants.%array_type] {
  101. // CHECK:STDOUT: %int_32.loc19_16: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  102. // CHECK:STDOUT: %i32.loc19_16: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  103. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  104. // CHECK:STDOUT: %int_32.loc19_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  105. // CHECK:STDOUT: %i32.loc19_27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  106. // CHECK:STDOUT: %impl.elem0.loc19_24: %.214 = impl_witness_access constants.%impl_witness.882, element0 [concrete = constants.%Convert.197]
  107. // CHECK:STDOUT: %bound_method.loc19_24: <bound method> = bound_method %int_1, %impl.elem0.loc19_24 [concrete = constants.%Convert.bound.c1b]
  108. // CHECK:STDOUT: %specific_fn.loc19_24: <specific function> = specific_function %bound_method.loc19_24, @Convert.5(constants.%int_32) [concrete = constants.%Convert.specific_fn.f9a]
  109. // CHECK:STDOUT: %int.convert_checked.loc19_24: init %i32 = call %specific_fn.loc19_24(%int_1) [concrete = constants.%int_1.5d2]
  110. // CHECK:STDOUT: %.loc19_24.1: %i32 = value_of_initializer %int.convert_checked.loc19_24 [concrete = constants.%int_1.5d2]
  111. // CHECK:STDOUT: %.loc19_24.2: %i32 = converted %int_1, %.loc19_24.1 [concrete = constants.%int_1.5d2]
  112. // CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [concrete = constants.%I.type]
  113. // CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.%assoc0 [concrete = constants.%assoc0.a5e]
  114. // CHECK:STDOUT: %impl.elem0.loc19_31: %.c3e = impl_witness_access constants.%impl_witness.da7, element0 [concrete = constants.%F.9ec]
  115. // CHECK:STDOUT: %bound_method.loc19_31: <bound method> = bound_method %.loc19_24.2, %impl.elem0.loc19_31 [concrete = constants.%F.bound]
  116. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  117. // CHECK:STDOUT: %impl.elem0.loc19_38: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956]
  118. // CHECK:STDOUT: %bound_method.loc19_38: <bound method> = bound_method %int_2, %impl.elem0.loc19_38 [concrete = constants.%Convert.bound.ef9]
  119. // CHECK:STDOUT: %specific_fn.loc19_38: <specific function> = specific_function %bound_method.loc19_38, @Convert.3(constants.%int_32) [concrete = constants.%Convert.specific_fn.787]
  120. // CHECK:STDOUT: %int.convert_checked.loc19_38: init %i32 = call %specific_fn.loc19_38(%int_2) [concrete = constants.%int_2.ef8]
  121. // CHECK:STDOUT: %.loc19_38.1: %i32 = value_of_initializer %int.convert_checked.loc19_38 [concrete = constants.%int_2.ef8]
  122. // CHECK:STDOUT: %.loc19_38.2: %i32 = converted %int_2, %.loc19_38.1 [concrete = constants.%int_2.ef8]
  123. // CHECK:STDOUT: %int.sadd: init %i32 = call %bound_method.loc19_31(%.loc19_24.2, %.loc19_38.2) [concrete = constants.%int_3.822]
  124. // CHECK:STDOUT: %impl.elem0.loc19_39: %.10e = impl_witness_access constants.%impl_witness.023, element0 [concrete = constants.%Convert.960]
  125. // CHECK:STDOUT: %bound_method.loc19_39: <bound method> = bound_method %int.sadd, %impl.elem0.loc19_39 [concrete = constants.%Convert.bound.2d6]
  126. // CHECK:STDOUT: %specific_fn.loc19_39: <specific function> = specific_function %bound_method.loc19_39, @Convert.4(constants.%int_32) [concrete = constants.%Convert.specific_fn.377]
  127. // CHECK:STDOUT: %.loc19_39.1: %i32 = value_of_initializer %int.sadd [concrete = constants.%int_3.822]
  128. // CHECK:STDOUT: %.loc19_39.2: %i32 = converted %int.sadd, %.loc19_39.1 [concrete = constants.%int_3.822]
  129. // CHECK:STDOUT: %int.convert_checked.loc19_39: init Core.IntLiteral = call %specific_fn.loc19_39(%.loc19_39.2) [concrete = constants.%int_3.1ba]
  130. // CHECK:STDOUT: %.loc19_39.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc19_39 [concrete = constants.%int_3.1ba]
  131. // CHECK:STDOUT: %.loc19_39.4: Core.IntLiteral = converted %int.sadd, %.loc19_39.3 [concrete = constants.%int_3.1ba]
  132. // CHECK:STDOUT: %array_type: type = array_type %.loc19_39.4, %i32 [concrete = constants.%array_type]
  133. // CHECK:STDOUT: }
  134. // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var
  135. // CHECK:STDOUT: }
  136. // CHECK:STDOUT:
  137. // CHECK:STDOUT: interface @I {
  138. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826]
  139. // CHECK:STDOUT: %F.decl: %F.type.cf0 = fn_decl @F.1 [concrete = constants.%F.bc6] {
  140. // CHECK:STDOUT: %self.patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.b70) = binding_pattern self
  141. // CHECK:STDOUT: %self.param_patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.b70) = value_param_pattern %self.patt, runtime_param0
  142. // CHECK:STDOUT: %other.patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.b70) = binding_pattern other
  143. // CHECK:STDOUT: %other.param_patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.b70) = value_param_pattern %other.patt, runtime_param1
  144. // CHECK:STDOUT: %return.patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.b70) = return_slot_pattern
  145. // CHECK:STDOUT: %return.param_patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.b70) = out_param_pattern %return.patt, runtime_param2
  146. // CHECK:STDOUT: } {
  147. // CHECK:STDOUT: %Self.ref.loc12_36: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.826)]
  148. // CHECK:STDOUT: %Self.as_type.loc12_36: type = facet_access_type %Self.ref.loc12_36 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.b70)]
  149. // CHECK:STDOUT: %.loc12_36: type = converted %Self.ref.loc12_36, %Self.as_type.loc12_36 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.b70)]
  150. // CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.b70) = value_param runtime_param0
  151. // CHECK:STDOUT: %.loc12_14.1: type = splice_block %.loc12_14.2 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.b70)] {
  152. // CHECK:STDOUT: %Self.ref.loc12_14: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.826)]
  153. // CHECK:STDOUT: %Self.as_type.loc12_14.2: type = facet_access_type %Self.ref.loc12_14 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.b70)]
  154. // CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref.loc12_14, %Self.as_type.loc12_14.2 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.b70)]
  155. // CHECK:STDOUT: }
  156. // CHECK:STDOUT: %self: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.b70) = bind_name self, %self.param
  157. // CHECK:STDOUT: %other.param: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.b70) = value_param runtime_param1
  158. // CHECK:STDOUT: %.loc12_27.1: type = splice_block %.loc12_27.2 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.b70)] {
  159. // CHECK:STDOUT: %Self.ref.loc12_27: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.826)]
  160. // CHECK:STDOUT: %Self.as_type.loc12_27: type = facet_access_type %Self.ref.loc12_27 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.b70)]
  161. // CHECK:STDOUT: %.loc12_27.2: type = converted %Self.ref.loc12_27, %Self.as_type.loc12_27 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.b70)]
  162. // CHECK:STDOUT: }
  163. // CHECK:STDOUT: %other: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.b70) = bind_name other, %other.param
  164. // CHECK:STDOUT: %return.param: ref @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.b70) = out_param runtime_param2
  165. // CHECK:STDOUT: %return: ref @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.b70) = return_slot %return.param
  166. // CHECK:STDOUT: }
  167. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0.a5e]
  168. // CHECK:STDOUT:
  169. // CHECK:STDOUT: !members:
  170. // CHECK:STDOUT: .Self = %Self
  171. // CHECK:STDOUT: .F = %assoc0
  172. // CHECK:STDOUT: witness = (%F.decl)
  173. // CHECK:STDOUT: }
  174. // CHECK:STDOUT:
  175. // CHECK:STDOUT: impl @impl.a9a: %i32 as %I.ref {
  176. // CHECK:STDOUT: %F.decl: %F.type.066 = fn_decl @F.2 [concrete = constants.%F.9ec] {
  177. // CHECK:STDOUT: %self.patt: %i32 = binding_pattern self
  178. // CHECK:STDOUT: %self.param_patt: %i32 = value_param_pattern %self.patt, runtime_param0
  179. // CHECK:STDOUT: %other.patt: %i32 = binding_pattern other
  180. // CHECK:STDOUT: %other.param_patt: %i32 = value_param_pattern %other.patt, runtime_param1
  181. // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern
  182. // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2
  183. // CHECK:STDOUT: } {
  184. // CHECK:STDOUT: %int_32.loc16_34: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  185. // CHECK:STDOUT: %i32.loc16_34: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  186. // CHECK:STDOUT: %self.param: %i32 = value_param runtime_param0
  187. // CHECK:STDOUT: %.loc16_14: type = splice_block %i32.loc16_14 [concrete = constants.%i32] {
  188. // CHECK:STDOUT: %int_32.loc16_14: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  189. // CHECK:STDOUT: %i32.loc16_14: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  190. // CHECK:STDOUT: }
  191. // CHECK:STDOUT: %self: %i32 = bind_name self, %self.param
  192. // CHECK:STDOUT: %other.param: %i32 = value_param runtime_param1
  193. // CHECK:STDOUT: %.loc16_26: type = splice_block %i32.loc16_26 [concrete = constants.%i32] {
  194. // CHECK:STDOUT: %int_32.loc16_26: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  195. // CHECK:STDOUT: %i32.loc16_26: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  196. // CHECK:STDOUT: }
  197. // CHECK:STDOUT: %other: %i32 = bind_name other, %other.param
  198. // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2
  199. // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
  200. // CHECK:STDOUT: }
  201. // CHECK:STDOUT:
  202. // CHECK:STDOUT: !members:
  203. // CHECK:STDOUT: .F = %F.decl
  204. // CHECK:STDOUT: witness = file.%impl_witness
  205. // CHECK:STDOUT: }
  206. // CHECK:STDOUT:
  207. // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) {
  208. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.826)]
  209. // CHECK:STDOUT: %Self.as_type.loc12_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.b70)]
  210. // CHECK:STDOUT:
  211. // CHECK:STDOUT: fn[%self.param_patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.b70)](%other.param_patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.b70)) -> @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.b70);
  212. // CHECK:STDOUT: }
  213. // CHECK:STDOUT:
  214. // CHECK:STDOUT: fn @F.2[%self.param_patt: %i32](%other.param_patt: %i32) -> %i32 = "int.sadd";
  215. // CHECK:STDOUT:
  216. // CHECK:STDOUT: specific @F.1(constants.%Self.826) {
  217. // CHECK:STDOUT: %Self => constants.%Self.826
  218. // CHECK:STDOUT: %Self.as_type.loc12_14.1 => constants.%Self.as_type.b70
  219. // CHECK:STDOUT: }
  220. // CHECK:STDOUT:
  221. // CHECK:STDOUT: specific @F.1(constants.%I.facet) {
  222. // CHECK:STDOUT: %Self => constants.%I.facet
  223. // CHECK:STDOUT: %Self.as_type.loc12_14.1 => constants.%i32
  224. // CHECK:STDOUT: }
  225. // CHECK:STDOUT: