diff --git a/jscomp/core/j.ml b/jscomp/core/j.ml index 4e43b0e37..12daa7378 100644 --- a/jscomp/core/j.ml +++ b/jscomp/core/j.ml @@ -130,8 +130,7 @@ and expression_desc = All exported declarations have to be OCaml identifiers 2. Javascript dot (need to be preserved/or using quote) *) - | New of { expr : expression; args : expression list option } - (* TODO: option remove *) + | New of { expr : expression; args : expression list } | Var of vident | Fun of { method_ : bool; diff --git a/jscomp/core/js_dump.ml b/jscomp/core/js_dump.ml index df7b915b6..185275513 100644 --- a/jscomp/core/js_dump.ml +++ b/jscomp/core/js_dump.ml @@ -892,8 +892,7 @@ and expression_desc cxt ~(level : int) x : cxt = string cxt L.new_; space cxt; let cxt = expression ~level:16 cxt e in - paren_group cxt 1 (fun _ -> - match el with Some el -> arguments cxt el | None -> cxt))) + paren_group cxt 1 (fun _ -> arguments cxt el))) | Cond { pred = e; then_ = e1; else_ = e2 } -> let action () = let cxt = expression ~level:3 cxt e in diff --git a/jscomp/core/js_exp_make.ml b/jscomp/core/js_exp_make.ml index 3813a1365..fe0736f6d 100644 --- a/jscomp/core/js_exp_make.ml +++ b/jscomp/core/js_exp_make.ml @@ -205,7 +205,7 @@ let typeof ?loc ?comment (e : t) : t = | _ -> make_expression ?loc ?comment (Typeof e) let new_ ?loc ?comment e0 args : t = - make_expression ?loc ?comment (New { expr = e0; args = Some args }) + make_expression ?loc ?comment (New { expr = e0; args }) let unit : t = make_expression Undefined