Skip to content

Commit 6aa6de9

Browse files
committed
tweak
1 parent 3088852 commit 6aa6de9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

jscomp/syntax/ast_util.ml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ let record_as_js_object
634634
let labels,args, arity =
635635
Ext_list.fold_right label_exprs ([],[],0) (fun ({txt ; loc}, e) (labels,args,i) ->
636636
match txt with
637-
| Longident.Lident x ->
637+
| Lident x ->
638638
({Asttypes.loc = loc ; txt = x} :: labels, (x, self.expr self e) :: args, i + 1)
639639
| Ldot _ | Lapply _ ->
640640
Location.raise_errorf ~loc "invalid js label ") in
@@ -645,8 +645,12 @@ let record_as_js_object
645645

646646

647647

648-
let isCamlExceptionOrOpenVariant = Longident.parse "Caml_exceptions.isCamlExceptionOrOpenVariant"
649-
let obj_magic = Longident.parse "Obj.magic"
648+
let isCamlExceptionOrOpenVariant : Longident.t =
649+
Ldot (Lident "Caml_exceptions","isCamlExceptionOrOpenVariant")
650+
651+
let obj_magic : Longident.t =
652+
Ldot (Lident "Obj", "magic")
653+
650654

651655
let rec checkCases (cases : Parsetree.case list) =
652656
List.iter check_case cases

0 commit comments

Comments
 (0)