Skip to content

Commit e54e486

Browse files
cristianoccknitt
authored andcommitted
Fix issue with uninitialized _param in recursive functions with unit argument.
Fixes #6719
1 parent a587243 commit e54e486

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- Avoid generating calls to Curry when adjusting arity of uncurried functions. https://github.com/rescript-lang/rescript-compiler/pull/6870
2222
- Fix build after calling without `-warn-error`, see https://github.com/rescript-lang/rescript-compiler/issues/6868 for more details. https://github.com/rescript-lang/rescript-compiler/pull/6877
2323
- Fix `Js.Types.JSBigInt` payload to use native `bigint` type. https://github.com/rescript-lang/rescript-compiler/pull/6911
24+
- Fix issue with uninitialized `_param` in recursive functions with unit argument. https://github.com/rescript-lang/rescript-compiler/pull/6907
2425

2526
# 11.1.3-rc.1
2627

jscomp/core/lam_compile.ml

+1
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ and compile_recursive_let ~all_bindings (cxt : Lam_compile_context.t)
328328
]}
329329
[Alias] may not be exact
330330
*)
331+
let params = if oneUnitArg then [] else params in
331332
let ret : Lam_compile_context.return_label =
332333
{
333334
id;

jscomp/test/uncurry_test.js

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

0 commit comments

Comments
 (0)