Skip to content

Commit c3f4545

Browse files
committed
clean up
1 parent 87bd0a1 commit c3f4545

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

jscomp/core/js_dump.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -757,9 +757,9 @@ and expression_desc cxt ~(level : int) f x : cxt =
757757
(if !Js_config.debug then [ (name_symbol, E.str p.name) ] else [])
758758
(fun i -> Js_op.Lit i)
759759
in
760-
let is_optional (names: string list) (pname: Js_op.property_name) =
760+
let is_optional (pname: Js_op.property_name) =
761761
match pname with
762-
| Lit n -> Ext_list.mem_string names n
762+
| Lit n -> Ext_list.mem_string p.optional_labels n
763763
| Symbol_name -> false
764764
in
765765
let tails =
@@ -768,7 +768,7 @@ and expression_desc cxt ~(level : int) f x : cxt =
768768
| _ ->
769769
Ext_list.filter_map tails (fun (f, x) ->
770770
match x.expression_desc with
771-
| Undefined when is_optional p.optional_labels f -> None
771+
| Undefined when is_optional f -> None
772772
| _ -> Some (f, x))
773773
in
774774
if p.num_nonconst = 1 then tails

lib/4.06.1/unstable/js_compiler.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81688,9 +81688,9 @@ and expression_desc cxt ~(level : int) f x : cxt =
8168881688
(if !Js_config.debug then [ (name_symbol, E.str p.name) ] else [])
8168981689
(fun i -> Js_op.Lit i)
8169081690
in
81691-
let is_optional (names: string list) (pname: Js_op.property_name) =
81691+
let is_optional (pname: Js_op.property_name) =
8169281692
match pname with
81693-
| Lit n -> Ext_list.mem_string names n
81693+
| Lit n -> Ext_list.mem_string p.optional_labels n
8169481694
| Symbol_name -> false
8169581695
in
8169681696
let tails =
@@ -81699,7 +81699,7 @@ and expression_desc cxt ~(level : int) f x : cxt =
8169981699
| _ ->
8170081700
Ext_list.filter_map tails (fun (f, x) ->
8170181701
match x.expression_desc with
81702-
| Undefined when is_optional p.optional_labels f -> None
81702+
| Undefined when is_optional f -> None
8170381703
| _ -> Some (f, x))
8170481704
in
8170581705
if p.num_nonconst = 1 then tails

lib/4.06.1/unstable/js_playground_compiler.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81688,9 +81688,9 @@ and expression_desc cxt ~(level : int) f x : cxt =
8168881688
(if !Js_config.debug then [ (name_symbol, E.str p.name) ] else [])
8168981689
(fun i -> Js_op.Lit i)
8169081690
in
81691-
let is_optional (names: string list) (pname: Js_op.property_name) =
81691+
let is_optional (pname: Js_op.property_name) =
8169281692
match pname with
81693-
| Lit n -> Ext_list.mem_string names n
81693+
| Lit n -> Ext_list.mem_string p.optional_labels n
8169481694
| Symbol_name -> false
8169581695
in
8169681696
let tails =
@@ -81699,7 +81699,7 @@ and expression_desc cxt ~(level : int) f x : cxt =
8169981699
| _ ->
8170081700
Ext_list.filter_map tails (fun (f, x) ->
8170181701
match x.expression_desc with
81702-
| Undefined when is_optional p.optional_labels f -> None
81702+
| Undefined when is_optional f -> None
8170381703
| _ -> Some (f, x))
8170481704
in
8170581705
if p.num_nonconst = 1 then tails

lib/4.06.1/whole_compiler.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136557,9 +136557,9 @@ and expression_desc cxt ~(level : int) f x : cxt =
136557136557
(if !Js_config.debug then [ (name_symbol, E.str p.name) ] else [])
136558136558
(fun i -> Js_op.Lit i)
136559136559
in
136560-
let is_optional (names: string list) (pname: Js_op.property_name) =
136560+
let is_optional (pname: Js_op.property_name) =
136561136561
match pname with
136562-
| Lit n -> Ext_list.mem_string names n
136562+
| Lit n -> Ext_list.mem_string p.optional_labels n
136563136563
| Symbol_name -> false
136564136564
in
136565136565
let tails =
@@ -136568,7 +136568,7 @@ and expression_desc cxt ~(level : int) f x : cxt =
136568136568
| _ ->
136569136569
Ext_list.filter_map tails (fun (f, x) ->
136570136570
match x.expression_desc with
136571-
| Undefined when is_optional p.optional_labels f -> None
136571+
| Undefined when is_optional f -> None
136572136572
| _ -> Some (f, x))
136573136573
in
136574136574
if p.num_nonconst = 1 then tails

0 commit comments

Comments
 (0)