Skip to content

Commit a4465d4

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

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
@@ -20,6 +20,7 @@
2020
- Ignore `@uncurry` attribute in uncurried mode, to avoid generating calls to `Curry` at runtime. https://github.com/rescript-lang/rescript-compiler/pull/6869
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
23+
- Fix issue with uninitialized `_param` in recursive functions with unit argument. https://github.com/rescript-lang/rescript-compiler/pull/6907
2324

2425
# 11.1.3-rc.1
2526

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)