File tree Expand file tree Collapse file tree 5 files changed +102
-64
lines changed Expand file tree Collapse file tree 5 files changed +102
-64
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,14 @@ function hh2(x) {
55
55
}
56
56
}
57
57
58
- exports . v = v ;
58
+ var u = {
59
+ "xx-yy" : 3
60
+ } ;
61
+
62
+ var match = u [ "xx-yy" ] ;
63
+
64
+ var v$1 = match !== undefined ? match : 0 ;
65
+
59
66
exports . b = b ;
60
67
exports . c = c ;
61
68
exports . ff = ff ;
@@ -64,4 +71,6 @@ exports.h1 = h1;
64
71
exports . h2 = h2 ;
65
72
exports . hh = hh ;
66
73
exports . hh2 = hh2 ;
74
+ exports . u = u ;
75
+ exports . v = v$1 ;
67
76
/* Not a pure module */
Original file line number Diff line number Diff line change @@ -61,3 +61,32 @@ let hh2 x =
61
61
match x |. low with
62
62
| None -> 0
63
63
| Some _ -> 1
64
+
65
+ type css =
66
+ {
67
+ a0 : int option ;
68
+ a1 : int option ;
69
+ a2 : int option ;
70
+ a3 : int option ;
71
+ a4 : int option ;
72
+ a5 : int option ;
73
+ a6 : int option ;
74
+ a7 : int option ;
75
+ a8 : int option ;
76
+ a9 : int option
77
+ [@ bs.as "xx-yy" ];
78
+ a10 : int option ;
79
+ a11 : int option ;
80
+ a12 : int option ;
81
+ a13 : int option ;
82
+ a14 : int option ;
83
+ a15 : int option ;
84
+ }
85
+ [@@ bs.deriving abstract ]
86
+
87
+
88
+ let u = css ~a9: 3 ()
89
+ let v =
90
+ match u |. a9 with
91
+ | None -> 0
92
+ | Some x -> x
Original file line number Diff line number Diff line change @@ -33443,27 +33443,27 @@ let pval_prim_of_option_labels
33443
33443
(labels : (bool * string Asttypes.loc) list)
33444
33444
(ends_with_unit : bool)
33445
33445
=
33446
- let arg_kinds =
33447
- Ext_list.fold_right
33448
- (fun (is_option,{Asttypes.loc ; txt }) arg_kinds
33449
- ->
33450
- let label_name = (Lam_methname.translate ~loc txt) in
33451
- let arg_label =
33452
- if is_option then
33453
- External_arg_spec.optional label_name
33454
- else External_arg_spec.label label_name None
33455
- in
33456
- {External_arg_spec.arg_type = Nothing ;
33457
- arg_label } :: arg_kinds
33458
- )
33459
- labels
33460
- (if ends_with_unit then
33461
- [External_arg_spec.empty_kind Extern_unit]
33462
- else [])
33463
- in
33464
- let encoding =
33465
- External_ffi_types.to_string (Ffi_obj_create arg_kinds) in
33466
- [""; encoding]
33446
+ let arg_kinds =
33447
+ Ext_list.fold_right
33448
+ (fun (is_option,{Asttypes.loc ; txt }) arg_kinds
33449
+ ->
33450
+ let label_name = (Lam_methname.translate ~loc txt) in
33451
+ let arg_label =
33452
+ if is_option then
33453
+ External_arg_spec.optional label_name
33454
+ else External_arg_spec.label label_name None
33455
+ in
33456
+ {External_arg_spec.arg_type = Nothing ;
33457
+ arg_label } :: arg_kinds
33458
+ )
33459
+ labels
33460
+ (if ends_with_unit then
33461
+ [External_arg_spec.empty_kind Extern_unit]
33462
+ else [])
33463
+ in
33464
+ let encoding =
33465
+ External_ffi_types.to_string (Ffi_obj_create arg_kinds) in
33466
+ [""; encoding]
33467
33467
33468
33468
33469
33469
end
Original file line number Diff line number Diff line change @@ -15449,27 +15449,27 @@ let pval_prim_of_option_labels
15449
15449
(labels : (bool * string Asttypes.loc) list)
15450
15450
(ends_with_unit : bool)
15451
15451
=
15452
- let arg_kinds =
15453
- Ext_list.fold_right
15454
- (fun (is_option,{Asttypes.loc ; txt }) arg_kinds
15455
- ->
15456
- let label_name = (Lam_methname.translate ~loc txt) in
15457
- let arg_label =
15458
- if is_option then
15459
- External_arg_spec.optional label_name
15460
- else External_arg_spec.label label_name None
15461
- in
15462
- {External_arg_spec.arg_type = Nothing ;
15463
- arg_label } :: arg_kinds
15464
- )
15465
- labels
15466
- (if ends_with_unit then
15467
- [External_arg_spec.empty_kind Extern_unit]
15468
- else [])
15469
- in
15470
- let encoding =
15471
- External_ffi_types.to_string (Ffi_obj_create arg_kinds) in
15472
- [""; encoding]
15452
+ let arg_kinds =
15453
+ Ext_list.fold_right
15454
+ (fun (is_option,{Asttypes.loc ; txt }) arg_kinds
15455
+ ->
15456
+ let label_name = (Lam_methname.translate ~loc txt) in
15457
+ let arg_label =
15458
+ if is_option then
15459
+ External_arg_spec.optional label_name
15460
+ else External_arg_spec.label label_name None
15461
+ in
15462
+ {External_arg_spec.arg_type = Nothing ;
15463
+ arg_label } :: arg_kinds
15464
+ )
15465
+ labels
15466
+ (if ends_with_unit then
15467
+ [External_arg_spec.empty_kind Extern_unit]
15468
+ else [])
15469
+ in
15470
+ let encoding =
15471
+ External_ffi_types.to_string (Ffi_obj_create arg_kinds) in
15472
+ [""; encoding]
15473
15473
15474
15474
15475
15475
end
Original file line number Diff line number Diff line change @@ -107916,27 +107916,27 @@ let pval_prim_of_option_labels
107916
107916
(labels : (bool * string Asttypes.loc) list)
107917
107917
(ends_with_unit : bool)
107918
107918
=
107919
- let arg_kinds =
107920
- Ext_list.fold_right
107921
- (fun (is_option,{Asttypes.loc ; txt }) arg_kinds
107922
- ->
107923
- let label_name = (Lam_methname.translate ~loc txt) in
107924
- let arg_label =
107925
- if is_option then
107926
- External_arg_spec.optional label_name
107927
- else External_arg_spec.label label_name None
107928
- in
107929
- {External_arg_spec.arg_type = Nothing ;
107930
- arg_label } :: arg_kinds
107931
- )
107932
- labels
107933
- (if ends_with_unit then
107934
- [External_arg_spec.empty_kind Extern_unit]
107935
- else [])
107936
- in
107937
- let encoding =
107938
- External_ffi_types.to_string (Ffi_obj_create arg_kinds) in
107939
- [""; encoding]
107919
+ let arg_kinds =
107920
+ Ext_list.fold_right
107921
+ (fun (is_option,{Asttypes.loc ; txt }) arg_kinds
107922
+ ->
107923
+ let label_name = (Lam_methname.translate ~loc txt) in
107924
+ let arg_label =
107925
+ if is_option then
107926
+ External_arg_spec.optional label_name
107927
+ else External_arg_spec.label label_name None
107928
+ in
107929
+ {External_arg_spec.arg_type = Nothing ;
107930
+ arg_label } :: arg_kinds
107931
+ )
107932
+ labels
107933
+ (if ends_with_unit then
107934
+ [External_arg_spec.empty_kind Extern_unit]
107935
+ else [])
107936
+ in
107937
+ let encoding =
107938
+ External_ffi_types.to_string (Ffi_obj_create arg_kinds) in
107939
+ [""; encoding]
107940
107940
107941
107941
107942
107942
end
You can’t perform that action at this time.
0 commit comments