Skip to content

Commit 8718212

Browse files
committed
fix ghost location in empty array & update upstream to avoid printing ghost locations
1 parent 96c8bb0 commit 8718212

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

jscomp/syntax/bs_builtin_ppx.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,16 @@ let expr_mapper (self : mapper) (e : Parsetree.expression) =
8383
let name = "emptyArray" in
8484
let unit : _ Asttypes.loc = {txt = Ast_literal.Lid.val_unit ; loc } in
8585
let open Ast_helper in
86-
Exp.let_ Nonrecursive
86+
Exp.let_ Nonrecursive ~loc
8787
[{pvb_pat =
8888
Pat.var {txt = name ; loc} ~loc ;
8989
pvb_expr =
9090
Exp.fun_ Nolabel None
9191
(Pat.construct unit None)
9292
(Exp.array [] ~attrs:[{txt = ""; loc}, PStr []]);
9393
pvb_loc = loc; pvb_attributes = []}]
94-
(Exp.apply
95-
(Exp.ident {txt = Lident name; loc})
94+
(Exp.apply ~loc
95+
(Exp.ident ~loc {txt = Lident name; loc})
9696
[Nolabel,
9797
Exp.construct unit None ~loc;
9898
])

ocaml

Submodule ocaml updated from 4ff3edc to 270ab07

0 commit comments

Comments
 (0)