Skip to content

Commit fadabf6

Browse files
committed
Fix issue with uninitialized _param in recursive functions with unit argument.
Fixes #6719
1 parent 3b47ef9 commit fadabf6

File tree

6 files changed

+2
-4
lines changed

6 files changed

+2
-4
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
- Avoid generation of `Curry` with reverse application `|>`. https://github.com/rescript-lang/rescript-compiler/pull/6876
5050
- Fix issue where the internal ppx for pipe `->` would not use uncurried application in uncurried mode. https://github.com/rescript-lang/rescript-compiler/pull/6878
5151
- 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
52+
- Fix issue with uninitialized `_param` in recursive functions with unit argument. https://github.com/rescript-lang/rescript-compiler/pull/6907
5253

5354
#### :house: Internal
5455

jscomp/core/lam_compile.ml

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

jscomp/test/ocaml_re_test.js

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

jscomp/test/uncurry_test.js

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

lib/es6/stream.js

-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ function iter(f, strm) {
266266
}
267267
junk(strm);
268268
f(Caml_option.valFromOption(a));
269-
_param = undefined;
270269
continue;
271270
};
272271
};

lib/js/stream.js

-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ function iter(f, strm) {
266266
}
267267
junk(strm);
268268
f(Caml_option.valFromOption(a));
269-
_param = undefined;
270269
continue;
271270
};
272271
};

0 commit comments

Comments
 (0)