Skip to content

Commit fe0388b

Browse files
committed
accormodate one more field
1 parent 82acf67 commit fe0388b

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

jscomp/frontend/external_arg_spec.ml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ type label_noname =
3737
type label =
3838
| Obj_label of {name : string }
3939
| Obj_empty
40-
| Obj_optional of {name : string }
40+
| Obj_optional of {name : string; for_sure_no_nested_option : bool }
41+
4142
(* it will be ignored , side effect will be recorded *)
4243

4344

@@ -90,7 +91,8 @@ let empty_label = Obj_empty
9091
let obj_label name =
9192
Obj_label {name }
9293

93-
let optional name = Obj_optional {name}
94+
let optional for_sure_no_nested_option name =
95+
Obj_optional {name; for_sure_no_nested_option}
9496

9597
let empty_kind obj_arg_type = { obj_arg_label = empty_label ; obj_arg_type }
9698
let dummy =

jscomp/frontend/external_arg_spec.mli

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ type label = private
3232
| Obj_label of {name : string}
3333
| Obj_empty
3434

35-
| Obj_optional of {name : string}
35+
| Obj_optional of {name : string;
36+
for_sure_no_nested_option : bool}
3637
(* it will be ignored , side effect will be recorded *)
3738

3839

@@ -83,6 +84,8 @@ val cst_string : string -> cst
8384
val empty_label : label
8485
(* val empty_lit : cst -> label *)
8586
val obj_label : string -> label
86-
val optional : string -> label
87+
val optional :
88+
bool ->
89+
string -> label
8790
val empty_kind : attr -> obj_param
8891
val dummy : param

0 commit comments

Comments
 (0)