Skip to content

Commit c003e58

Browse files
committed
Fix uncurried arity for primitives.
1 parent 7cdb66d commit c003e58

File tree

7 files changed

+15
-25
lines changed

7 files changed

+15
-25
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
- Allow free vars in types for type coercion `e :> t`. https://github.com/rescript-lang/rescript-compiler/pull/6828
2121
- Allow `private` in with constraints. https://github.com/rescript-lang/rescript-compiler/pull/6843
2222
- Add regex literals as syntax sugar for `@bs.re`. https://github.com/rescript-lang/rescript-compiler/pull/6776
23-
- Improved mechanism to determine arity of externals, which is consistent however the type is written. https://github.com/rescript-lang/rescript-compiler/pull/6874 https://github.com/rescript-lang/rescript-compiler/pull/6881
23+
- Improved mechanism to determine arity of externals, which is consistent however the type is written. https://github.com/rescript-lang/rescript-compiler/pull/6874 https://github.com/rescript-lang/rescript-compiler/pull/6881 https://github.com/rescript-lang/rescript-compiler/pull/6883
2424

2525
#### :boom: Breaking Change
2626

jscomp/gentype_tests/typescript-react-example/src/ImportHookDefault.res.js

+3-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/gentype_tests/typescript-react-example/src/ImportHooks.res.js

+2-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/gentype_tests/typescript-react-example/src/ImportIndex.res.js

+2-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/gentype_tests/typescript-react-example/src/JSXV4.res.js

+2-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/gentype_tests/typescript-react-example/src/MyInput.res.js

+2-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/ml/typedecl.ml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1719,7 +1719,9 @@ let rec arity_from_arrow_type env core_type ty =
17191719
let parse_arity env core_type ty =
17201720
match Ast_uncurried.uncurried_type_get_arity_opt ~env ty with
17211721
| Some arity ->
1722-
let from_constructor = Ast_uncurried.uncurried_type_get_arity_opt ~env:Env.empty ty = None in
1722+
let from_constructor = match ty.desc with
1723+
| Tconstr (_, _, _) -> not (Ast_uncurried_utils.type_is_uncurried_fun ty)
1724+
| _ -> false in
17231725
(arity, from_constructor)
17241726
| None -> (arity_from_arrow_type env core_type ty, false)
17251727

0 commit comments

Comments
 (0)