int_float.carbon 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  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/deduce/int_float.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/deduce/int_float.carbon
  10. // --- int.carbon
  11. library "[[@TEST_NAME]]";
  12. fn F[N:! Core.BigInt()](n: Core.Int(N)) -> Core.BigInt() {
  13. return N;
  14. }
  15. fn G(a: i64) -> Core.BigInt() {
  16. return F(a);
  17. }
  18. // --- fail_todo_float.carbon
  19. library "[[@TEST_NAME]]";
  20. // TODO: This should pass once we accept symbolic widths for Core.Float.
  21. // CHECK:STDERR: fail_todo_float.carbon:[[@LINE+3]]:28: error: cannot evaluate type expression [TypeExprEvaluationFailure]
  22. // CHECK:STDERR: fn F[N:! Core.BigInt()](n: Core.Float(N)) -> Core.BigInt() {
  23. // CHECK:STDERR: ^~~~~~~~~~~~~
  24. fn F[N:! Core.BigInt()](n: Core.Float(N)) -> Core.BigInt() {
  25. return N;
  26. }
  27. fn G(a: f64) -> Core.BigInt() {
  28. return F(a);
  29. }
  30. // CHECK:STDOUT: --- int.carbon
  31. // CHECK:STDOUT:
  32. // CHECK:STDOUT: constants {
  33. // CHECK:STDOUT: %BigInt.type: type = fn_type @BigInt [template]
  34. // CHECK:STDOUT: %.1: type = tuple_type () [template]
  35. // CHECK:STDOUT: %BigInt: %BigInt.type = struct_value () [template]
  36. // CHECK:STDOUT: %N: Core.BigInt = bind_symbolic_name N, 0 [symbolic]
  37. // CHECK:STDOUT: %N.patt: Core.BigInt = symbolic_binding_pattern N, 0 [symbolic]
  38. // CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
  39. // CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
  40. // CHECK:STDOUT: %.2: type = int_type signed, %N [symbolic]
  41. // CHECK:STDOUT: %F.type: type = fn_type @F [template]
  42. // CHECK:STDOUT: %F: %F.type = struct_value () [template]
  43. // CHECK:STDOUT: %.3: Core.BigInt = int_literal 64 [template]
  44. // CHECK:STDOUT: %.4: type = int_type signed, %.3 [template]
  45. // CHECK:STDOUT: %G.type: type = fn_type @G [template]
  46. // CHECK:STDOUT: %G: %G.type = struct_value () [template]
  47. // CHECK:STDOUT: %.5: <specific function> = specific_function %F, @F(%.3) [template]
  48. // CHECK:STDOUT: }
  49. // CHECK:STDOUT:
  50. // CHECK:STDOUT: imports {
  51. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
  52. // CHECK:STDOUT: .BigInt = %import_ref.1
  53. // CHECK:STDOUT: .Int = %import_ref.2
  54. // CHECK:STDOUT: import Core//prelude
  55. // CHECK:STDOUT: import Core//prelude/...
  56. // CHECK:STDOUT: }
  57. // CHECK:STDOUT: %import_ref.1: %BigInt.type = import_ref Core//prelude/types, inst+7, loaded [template = constants.%BigInt]
  58. // CHECK:STDOUT: %import_ref.2: %Int.type = import_ref Core//prelude/types, inst+30, loaded [template = constants.%Int]
  59. // CHECK:STDOUT: }
  60. // CHECK:STDOUT:
  61. // CHECK:STDOUT: file {
  62. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  63. // CHECK:STDOUT: .Core = imports.%Core
  64. // CHECK:STDOUT: .F = %F.decl
  65. // CHECK:STDOUT: .G = %G.decl
  66. // CHECK:STDOUT: }
  67. // CHECK:STDOUT: %Core.import = import Core
  68. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
  69. // CHECK:STDOUT: %N.patt.loc4_6.1: Core.BigInt = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_6.2 (constants.%N.patt)]
  70. // CHECK:STDOUT: %N.param_patt: Core.BigInt = value_param_pattern %N.patt.loc4_6.1, runtime_param<invalid> [symbolic = %N.patt.loc4_6.2 (constants.%N.patt)]
  71. // CHECK:STDOUT: %n.patt: @F.%.loc4_36 (%.2) = binding_pattern n
  72. // CHECK:STDOUT: %n.param_patt: @F.%.loc4_36 (%.2) = value_param_pattern %n.patt, runtime_param0
  73. // CHECK:STDOUT: %return.patt: Core.BigInt = return_slot_pattern
  74. // CHECK:STDOUT: %return.param_patt: Core.BigInt = out_param_pattern %return.patt, runtime_param1
  75. // CHECK:STDOUT: } {
  76. // CHECK:STDOUT: %Core.ref.loc4_10: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
  77. // CHECK:STDOUT: %BigInt.ref.loc4_14: %BigInt.type = name_ref BigInt, imports.%import_ref.1 [template = constants.%BigInt]
  78. // CHECK:STDOUT: %big_int.make_type.loc4_21: init type = call %BigInt.ref.loc4_14() [template = Core.BigInt]
  79. // CHECK:STDOUT: %.loc4_22.1: type = value_of_initializer %big_int.make_type.loc4_21 [template = Core.BigInt]
  80. // CHECK:STDOUT: %.loc4_22.2: type = converted %big_int.make_type.loc4_21, %.loc4_22.1 [template = Core.BigInt]
  81. // CHECK:STDOUT: %Core.ref.loc4_28: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
  82. // CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int]
  83. // CHECK:STDOUT: %N.ref.loc4: Core.BigInt = name_ref N, %N.loc4_6.1 [symbolic = %N.loc4_6.2 (constants.%N)]
  84. // CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%N.ref.loc4) [symbolic = %.loc4_36 (constants.%.2)]
  85. // CHECK:STDOUT: %.loc4_38.1: type = value_of_initializer %int.make_type_signed [symbolic = %.loc4_36 (constants.%.2)]
  86. // CHECK:STDOUT: %.loc4_38.2: type = converted %int.make_type_signed, %.loc4_38.1 [symbolic = %.loc4_36 (constants.%.2)]
  87. // CHECK:STDOUT: %Core.ref.loc4_44: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
  88. // CHECK:STDOUT: %BigInt.ref.loc4_48: %BigInt.type = name_ref BigInt, imports.%import_ref.1 [template = constants.%BigInt]
  89. // CHECK:STDOUT: %big_int.make_type.loc4_55: init type = call %BigInt.ref.loc4_48() [template = Core.BigInt]
  90. // CHECK:STDOUT: %.loc4_56.1: type = value_of_initializer %big_int.make_type.loc4_55 [template = Core.BigInt]
  91. // CHECK:STDOUT: %.loc4_56.2: type = converted %big_int.make_type.loc4_55, %.loc4_56.1 [template = Core.BigInt]
  92. // CHECK:STDOUT: %N.param: Core.BigInt = value_param runtime_param<invalid>
  93. // CHECK:STDOUT: %N.loc4_6.1: Core.BigInt = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_6.2 (constants.%N)]
  94. // CHECK:STDOUT: %n.param: @F.%.loc4_36 (%.2) = value_param runtime_param0
  95. // CHECK:STDOUT: %n: @F.%.loc4_36 (%.2) = bind_name n, %n.param
  96. // CHECK:STDOUT: %return.param: ref Core.BigInt = out_param runtime_param1
  97. // CHECK:STDOUT: %return: ref Core.BigInt = return_slot %return.param
  98. // CHECK:STDOUT: }
  99. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
  100. // CHECK:STDOUT: %a.patt: %.4 = binding_pattern a
  101. // CHECK:STDOUT: %a.param_patt: %.4 = value_param_pattern %a.patt, runtime_param0
  102. // CHECK:STDOUT: %return.patt: Core.BigInt = return_slot_pattern
  103. // CHECK:STDOUT: %return.param_patt: Core.BigInt = out_param_pattern %return.patt, runtime_param1
  104. // CHECK:STDOUT: } {
  105. // CHECK:STDOUT: %.loc8_9.1: Core.BigInt = int_literal 64 [template = constants.%.3]
  106. // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_9.1) [template = constants.%.4]
  107. // CHECK:STDOUT: %.loc8_9.2: type = value_of_initializer %int.make_type_signed [template = constants.%.4]
  108. // CHECK:STDOUT: %.loc8_9.3: type = converted %int.make_type_signed, %.loc8_9.2 [template = constants.%.4]
  109. // CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
  110. // CHECK:STDOUT: %BigInt.ref: %BigInt.type = name_ref BigInt, imports.%import_ref.1 [template = constants.%BigInt]
  111. // CHECK:STDOUT: %big_int.make_type: init type = call %BigInt.ref() [template = Core.BigInt]
  112. // CHECK:STDOUT: %.loc8_29.1: type = value_of_initializer %big_int.make_type [template = Core.BigInt]
  113. // CHECK:STDOUT: %.loc8_29.2: type = converted %big_int.make_type, %.loc8_29.1 [template = Core.BigInt]
  114. // CHECK:STDOUT: %a.param: %.4 = value_param runtime_param0
  115. // CHECK:STDOUT: %a: %.4 = bind_name a, %a.param
  116. // CHECK:STDOUT: %return.param: ref Core.BigInt = out_param runtime_param1
  117. // CHECK:STDOUT: %return: ref Core.BigInt = return_slot %return.param
  118. // CHECK:STDOUT: }
  119. // CHECK:STDOUT: }
  120. // CHECK:STDOUT:
  121. // CHECK:STDOUT: fn @BigInt() -> type = "big_int.make_type";
  122. // CHECK:STDOUT:
  123. // CHECK:STDOUT: fn @Int(%size.param_patt: Core.BigInt) -> type = "int.make_type_signed";
  124. // CHECK:STDOUT:
  125. // CHECK:STDOUT: generic fn @F(%N.loc4_6.1: Core.BigInt) {
  126. // CHECK:STDOUT: %N.loc4_6.2: Core.BigInt = bind_symbolic_name N, 0 [symbolic = %N.loc4_6.2 (constants.%N)]
  127. // CHECK:STDOUT: %N.patt.loc4_6.2: Core.BigInt = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_6.2 (constants.%N.patt)]
  128. // CHECK:STDOUT: %.loc4_36: type = int_type signed, %N.loc4_6.2 [symbolic = %.loc4_36 (constants.%.2)]
  129. // CHECK:STDOUT:
  130. // CHECK:STDOUT: !definition:
  131. // CHECK:STDOUT:
  132. // CHECK:STDOUT: fn[%N.param_patt: Core.BigInt](%n.param_patt: @F.%.loc4_36 (%.2)) -> Core.BigInt {
  133. // CHECK:STDOUT: !entry:
  134. // CHECK:STDOUT: %N.ref.loc5: Core.BigInt = name_ref N, %N.loc4_6.1 [symbolic = %N.loc4_6.2 (constants.%N)]
  135. // CHECK:STDOUT: return %N.ref.loc5
  136. // CHECK:STDOUT: }
  137. // CHECK:STDOUT: }
  138. // CHECK:STDOUT:
  139. // CHECK:STDOUT: fn @G(%a.param_patt: %.4) -> Core.BigInt {
  140. // CHECK:STDOUT: !entry:
  141. // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
  142. // CHECK:STDOUT: %a.ref: %.4 = name_ref a, %a
  143. // CHECK:STDOUT: %.loc9_10: <specific function> = specific_function %F.ref, @F(constants.%.3) [template = constants.%.5]
  144. // CHECK:STDOUT: %F.call: init Core.BigInt = call %.loc9_10(%a.ref)
  145. // CHECK:STDOUT: %.loc9_14.1: Core.BigInt = value_of_initializer %F.call
  146. // CHECK:STDOUT: %.loc9_14.2: Core.BigInt = converted %F.call, %.loc9_14.1
  147. // CHECK:STDOUT: return %.loc9_14.2
  148. // CHECK:STDOUT: }
  149. // CHECK:STDOUT:
  150. // CHECK:STDOUT: specific @F(constants.%N) {
  151. // CHECK:STDOUT: %N.loc4_6.2 => constants.%N
  152. // CHECK:STDOUT: %N.patt.loc4_6.2 => constants.%N
  153. // CHECK:STDOUT: %.loc4_36 => constants.%.2
  154. // CHECK:STDOUT: }
  155. // CHECK:STDOUT:
  156. // CHECK:STDOUT: specific @F(constants.%.3) {
  157. // CHECK:STDOUT: %N.loc4_6.2 => constants.%.3
  158. // CHECK:STDOUT: %N.patt.loc4_6.2 => constants.%.3
  159. // CHECK:STDOUT: %.loc4_36 => constants.%.4
  160. // CHECK:STDOUT:
  161. // CHECK:STDOUT: !definition:
  162. // CHECK:STDOUT: }
  163. // CHECK:STDOUT:
  164. // CHECK:STDOUT: --- fail_todo_float.carbon
  165. // CHECK:STDOUT:
  166. // CHECK:STDOUT: constants {
  167. // CHECK:STDOUT: %BigInt.type: type = fn_type @BigInt [template]
  168. // CHECK:STDOUT: %.1: type = tuple_type () [template]
  169. // CHECK:STDOUT: %BigInt: %BigInt.type = struct_value () [template]
  170. // CHECK:STDOUT: %N: Core.BigInt = bind_symbolic_name N, 0 [symbolic]
  171. // CHECK:STDOUT: %N.patt: Core.BigInt = symbolic_binding_pattern N, 0 [symbolic]
  172. // CHECK:STDOUT: %Float.type: type = fn_type @Float [template]
  173. // CHECK:STDOUT: %Float: %Float.type = struct_value () [template]
  174. // CHECK:STDOUT: %F.type: type = fn_type @F [template]
  175. // CHECK:STDOUT: %F: %F.type = struct_value () [template]
  176. // CHECK:STDOUT: %.2: Core.BigInt = int_literal 64 [template]
  177. // CHECK:STDOUT: %G.type: type = fn_type @G [template]
  178. // CHECK:STDOUT: %G: %G.type = struct_value () [template]
  179. // CHECK:STDOUT: }
  180. // CHECK:STDOUT:
  181. // CHECK:STDOUT: imports {
  182. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
  183. // CHECK:STDOUT: .BigInt = %import_ref.1
  184. // CHECK:STDOUT: .Float = %import_ref.2
  185. // CHECK:STDOUT: import Core//prelude
  186. // CHECK:STDOUT: import Core//prelude/...
  187. // CHECK:STDOUT: }
  188. // CHECK:STDOUT: %import_ref.1: %BigInt.type = import_ref Core//prelude/types, inst+7, loaded [template = constants.%BigInt]
  189. // CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float]
  190. // CHECK:STDOUT: }
  191. // CHECK:STDOUT:
  192. // CHECK:STDOUT: file {
  193. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  194. // CHECK:STDOUT: .Core = imports.%Core
  195. // CHECK:STDOUT: .F = %F.decl
  196. // CHECK:STDOUT: .G = %G.decl
  197. // CHECK:STDOUT: }
  198. // CHECK:STDOUT: %Core.import = import Core
  199. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
  200. // CHECK:STDOUT: %N.patt.loc8_6.1: Core.BigInt = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc8_6.2 (constants.%N.patt)]
  201. // CHECK:STDOUT: %N.param_patt: Core.BigInt = value_param_pattern %N.patt.loc8_6.1, runtime_param<invalid> [symbolic = %N.patt.loc8_6.2 (constants.%N.patt)]
  202. // CHECK:STDOUT: %n.patt: <error> = binding_pattern n
  203. // CHECK:STDOUT: %n.param_patt: <error> = value_param_pattern %n.patt, runtime_param0
  204. // CHECK:STDOUT: %return.patt: Core.BigInt = return_slot_pattern
  205. // CHECK:STDOUT: %return.param_patt: Core.BigInt = out_param_pattern %return.patt, runtime_param1
  206. // CHECK:STDOUT: } {
  207. // CHECK:STDOUT: %Core.ref.loc8_10: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
  208. // CHECK:STDOUT: %BigInt.ref.loc8_14: %BigInt.type = name_ref BigInt, imports.%import_ref.1 [template = constants.%BigInt]
  209. // CHECK:STDOUT: %big_int.make_type.loc8_21: init type = call %BigInt.ref.loc8_14() [template = Core.BigInt]
  210. // CHECK:STDOUT: %.loc8_22.1: type = value_of_initializer %big_int.make_type.loc8_21 [template = Core.BigInt]
  211. // CHECK:STDOUT: %.loc8_22.2: type = converted %big_int.make_type.loc8_21, %.loc8_22.1 [template = Core.BigInt]
  212. // CHECK:STDOUT: %Core.ref.loc8_28: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
  213. // CHECK:STDOUT: %Float.ref: %Float.type = name_ref Float, imports.%import_ref.2 [template = constants.%Float]
  214. // CHECK:STDOUT: %N.ref.loc8: Core.BigInt = name_ref N, %N.loc8_6.1 [symbolic = %N.loc8_6.2 (constants.%N)]
  215. // CHECK:STDOUT: %float.make_type: init type = call %Float.ref(%N.ref.loc8)
  216. // CHECK:STDOUT: %.loc8_40.1: type = value_of_initializer %float.make_type
  217. // CHECK:STDOUT: %.loc8_40.2: type = converted %float.make_type, %.loc8_40.1
  218. // CHECK:STDOUT: %Core.ref.loc8_46: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
  219. // CHECK:STDOUT: %BigInt.ref.loc8_50: %BigInt.type = name_ref BigInt, imports.%import_ref.1 [template = constants.%BigInt]
  220. // CHECK:STDOUT: %big_int.make_type.loc8_57: init type = call %BigInt.ref.loc8_50() [template = Core.BigInt]
  221. // CHECK:STDOUT: %.loc8_58.1: type = value_of_initializer %big_int.make_type.loc8_57 [template = Core.BigInt]
  222. // CHECK:STDOUT: %.loc8_58.2: type = converted %big_int.make_type.loc8_57, %.loc8_58.1 [template = Core.BigInt]
  223. // CHECK:STDOUT: %N.param: Core.BigInt = value_param runtime_param<invalid>
  224. // CHECK:STDOUT: %N.loc8_6.1: Core.BigInt = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc8_6.2 (constants.%N)]
  225. // CHECK:STDOUT: %n.param: <error> = value_param runtime_param0
  226. // CHECK:STDOUT: %n: <error> = bind_name n, %n.param
  227. // CHECK:STDOUT: %return.param: ref Core.BigInt = out_param runtime_param1
  228. // CHECK:STDOUT: %return: ref Core.BigInt = return_slot %return.param
  229. // CHECK:STDOUT: }
  230. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
  231. // CHECK:STDOUT: %a.patt: f64 = binding_pattern a
  232. // CHECK:STDOUT: %a.param_patt: f64 = value_param_pattern %a.patt, runtime_param0
  233. // CHECK:STDOUT: %return.patt: Core.BigInt = return_slot_pattern
  234. // CHECK:STDOUT: %return.param_patt: Core.BigInt = out_param_pattern %return.patt, runtime_param1
  235. // CHECK:STDOUT: } {
  236. // CHECK:STDOUT: %.loc12_9.1: Core.BigInt = int_literal 64 [template = constants.%.2]
  237. // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc12_9.1) [template = f64]
  238. // CHECK:STDOUT: %.loc12_9.2: type = value_of_initializer %float.make_type [template = f64]
  239. // CHECK:STDOUT: %.loc12_9.3: type = converted %float.make_type, %.loc12_9.2 [template = f64]
  240. // CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
  241. // CHECK:STDOUT: %BigInt.ref: %BigInt.type = name_ref BigInt, imports.%import_ref.1 [template = constants.%BigInt]
  242. // CHECK:STDOUT: %big_int.make_type: init type = call %BigInt.ref() [template = Core.BigInt]
  243. // CHECK:STDOUT: %.loc12_29.1: type = value_of_initializer %big_int.make_type [template = Core.BigInt]
  244. // CHECK:STDOUT: %.loc12_29.2: type = converted %big_int.make_type, %.loc12_29.1 [template = Core.BigInt]
  245. // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0
  246. // CHECK:STDOUT: %a: f64 = bind_name a, %a.param
  247. // CHECK:STDOUT: %return.param: ref Core.BigInt = out_param runtime_param1
  248. // CHECK:STDOUT: %return: ref Core.BigInt = return_slot %return.param
  249. // CHECK:STDOUT: }
  250. // CHECK:STDOUT: }
  251. // CHECK:STDOUT:
  252. // CHECK:STDOUT: fn @BigInt() -> type = "big_int.make_type";
  253. // CHECK:STDOUT:
  254. // CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type";
  255. // CHECK:STDOUT:
  256. // CHECK:STDOUT: generic fn @F(%N.loc8_6.1: Core.BigInt) {
  257. // CHECK:STDOUT: %N.loc8_6.2: Core.BigInt = bind_symbolic_name N, 0 [symbolic = %N.loc8_6.2 (constants.%N)]
  258. // CHECK:STDOUT: %N.patt.loc8_6.2: Core.BigInt = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc8_6.2 (constants.%N.patt)]
  259. // CHECK:STDOUT:
  260. // CHECK:STDOUT: !definition:
  261. // CHECK:STDOUT:
  262. // CHECK:STDOUT: fn[%N.param_patt: Core.BigInt](%n.param_patt: <error>) -> Core.BigInt {
  263. // CHECK:STDOUT: !entry:
  264. // CHECK:STDOUT: %N.ref.loc9: Core.BigInt = name_ref N, %N.loc8_6.1 [symbolic = %N.loc8_6.2 (constants.%N)]
  265. // CHECK:STDOUT: return %N.ref.loc9
  266. // CHECK:STDOUT: }
  267. // CHECK:STDOUT: }
  268. // CHECK:STDOUT:
  269. // CHECK:STDOUT: fn @G(%a.param_patt: f64) -> Core.BigInt {
  270. // CHECK:STDOUT: !entry:
  271. // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
  272. // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a
  273. // CHECK:STDOUT: return <error>
  274. // CHECK:STDOUT: }
  275. // CHECK:STDOUT:
  276. // CHECK:STDOUT: specific @F(constants.%N) {
  277. // CHECK:STDOUT: %N.loc8_6.2 => constants.%N
  278. // CHECK:STDOUT: %N.patt.loc8_6.2 => constants.%N
  279. // CHECK:STDOUT: }
  280. // CHECK:STDOUT: