diff --git a/jscomp/ml/ast_await.ml b/jscomp/ml/ast_await.ml index 410f3b9c70..1393f04de6 100644 --- a/jscomp/ml/ast_await.ml +++ b/jscomp/ml/ast_await.ml @@ -2,7 +2,7 @@ let is_await : Parsetree.attribute -> bool = fun ({txt}, _) -> txt = "await" || txt = "res.await" let create_await_expression (e : Parsetree.expression) = - let loc = e.pexp_loc in + let loc = {e.pexp_loc with loc_ghost = true} in let unsafe_await = Ast_helper.Exp.ident ~loc {txt = Ldot (Ldot (Lident "Js", "Promise"), "unsafe_await"); loc}