Skip to content

Commit 941c9d3

Browse files
committed
fix #4488
1 parent 2d0691d commit 941c9d3

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

jscomp/core/js_dump.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ and expression_desc cxt ~(level:int) f x : cxt =
868868
| true, 1 -> Js_op.Lit Literals.tl
869869
| _ ->
870870
Js_op.Lit ("_" ^ string_of_int i)) , e )
871-
(if !Js_config.debug then
871+
(if !Js_config.debug && not is_cons then
872872
[name_symbol, E.str p.name]
873873
else []) in
874874
if p.num_nonconst = 1 then

jscomp/test/debug_mode_value.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,11 @@ var u = {
77
[Symbol.for("name")]: "A"
88
};
99

10+
var h = {
11+
hd: 1,
12+
tl: /* [] */0
13+
};
14+
1015
exports.u = u;
16+
exports.h = h;
1117
/* No side effect */

jscomp/test/debug_mode_value.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@
1212
type t = A of int * int
1313

1414
let u = A (1,2)
15+
let h = [1]

0 commit comments

Comments
 (0)