Skip to content

Commit aa256bf

Browse files
committed
add missing ops
1 parent 8d4151c commit aa256bf

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

ppx/browser/ppx_deriving_json_js.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ module Of_json = struct
5656
let eis_json_object ~loc x =
5757
[%expr
5858
Stdlib.( && )
59-
(Js.typeof [%e x] = "object")
59+
(Stdlib.( = ) (Js.typeof [%e x]) "object")
6060
(Stdlib.( && )
6161
(not (Js.Array.isArray [%e x]))
6262
(not (Stdlib.( == ) (Obj.magic [%e x] : 'a Js.null) Js.null)))]
@@ -119,7 +119,7 @@ module Of_json = struct
119119
let len = Js.Array.length array in
120120
if Stdlib.( > ) len 0 then
121121
let tag = Js.Array.unsafe_get array 0 in
122-
if Js.typeof tag = "string" then
122+
if Stdlib.( = ) (Js.typeof tag) "string" then
123123
let tag = (Obj.magic tag : string) in
124124
[%e body]
125125
else

ppx/test/ppx_deriving_json_js.t

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
if
122122
not
123123
(Stdlib.( && )
124-
(Js.typeof x = "object")
124+
(Stdlib.( = ) (Js.typeof x) "object")
125125
(Stdlib.( && )
126126
(not (Js.Array.isArray x))
127127
(not (Stdlib.( == ) (Obj.magic x : 'a Js.null) Js.null))))
@@ -185,7 +185,7 @@
185185
if
186186
not
187187
(Stdlib.( && )
188-
(Js.typeof x = "object")
188+
(Stdlib.( = ) (Js.typeof x) "object")
189189
(Stdlib.( && )
190190
(not (Js.Array.isArray x))
191191
(not (Stdlib.( == ) (Obj.magic x : 'a Js.null) Js.null))))
@@ -246,7 +246,7 @@
246246
if
247247
not
248248
(Stdlib.( && )
249-
(Js.typeof x = "object")
249+
(Stdlib.( = ) (Js.typeof x) "object")
250250
(Stdlib.( && )
251251
(not (Js.Array.isArray x))
252252
(not (Stdlib.( == ) (Obj.magic x : 'a Js.null) Js.null))))
@@ -293,7 +293,7 @@
293293
let len = Js.Array.length array in
294294
if Stdlib.( > ) len 0 then
295295
let tag = Js.Array.unsafe_get array 0 in
296-
if Js.typeof tag = "string" then
296+
if Stdlib.( = ) (Js.typeof tag) "string" then
297297
let tag = (Obj.magic tag : string) in
298298
if Stdlib.( = ) tag "A" then (
299299
if Stdlib.( <> ) len 1 then
@@ -313,7 +313,7 @@
313313
if
314314
not
315315
(Stdlib.( && )
316-
(Js.typeof fs = "object")
316+
(Stdlib.( = ) (Js.typeof fs) "object")
317317
(Stdlib.( && )
318318
(not (Js.Array.isArray fs))
319319
(not
@@ -422,7 +422,7 @@
422422
let len = Js.Array.length array in
423423
if Stdlib.( > ) len 0 then
424424
let tag = Js.Array.unsafe_get array 0 in
425-
if Js.typeof tag = "string" then
425+
if Stdlib.( = ) (Js.typeof tag) "string" then
426426
let tag = (Obj.magic tag : string) in
427427
if Stdlib.( = ) tag "A" then (
428428
if Stdlib.( <> ) len 1 then
@@ -492,7 +492,7 @@
492492
let len = Js.Array.length array in
493493
if Stdlib.( > ) len 0 then
494494
let tag = Js.Array.unsafe_get array 0 in
495-
if Js.typeof tag = "string" then
495+
if Stdlib.( = ) (Js.typeof tag) "string" then
496496
let tag = (Obj.magic tag : string) in
497497
if Stdlib.( = ) tag "C" then (
498498
if Stdlib.( <> ) len 2 then
@@ -547,7 +547,7 @@
547547
let len = Js.Array.length array in
548548
if Stdlib.( > ) len 0 then
549549
let tag = Js.Array.unsafe_get array 0 in
550-
if Js.typeof tag = "string" then
550+
if Stdlib.( = ) (Js.typeof tag) "string" then
551551
let tag = (Obj.magic tag : string) in
552552
if Stdlib.( = ) tag "A" then (
553553
if Stdlib.( <> ) len 1 then
@@ -605,7 +605,7 @@
605605
let len = Js.Array.length array in
606606
if Stdlib.( > ) len 0 then
607607
let tag = Js.Array.unsafe_get array 0 in
608-
if Js.typeof tag = "string" then
608+
if Stdlib.( = ) (Js.typeof tag) "string" then
609609
let tag = (Obj.magic tag : string) in
610610
if Stdlib.( = ) tag "A" then (
611611
if Stdlib.( <> ) len 1 then
@@ -744,7 +744,7 @@
744744
let len = Js.Array.length array in
745745
if Stdlib.( > ) len 0 then
746746
let tag = Js.Array.unsafe_get array 0 in
747-
if Js.typeof tag = "string" then
747+
if Stdlib.( = ) (Js.typeof tag) "string" then
748748
let tag = (Obj.magic tag : string) in
749749
if Stdlib.( = ) tag "A" then (
750750
if Stdlib.( <> ) len 2 then
@@ -798,7 +798,7 @@
798798
if
799799
not
800800
(Stdlib.( && )
801-
(Js.typeof x = "object")
801+
(Stdlib.( = ) (Js.typeof x) "object")
802802
(Stdlib.( && )
803803
(not (Js.Array.isArray x))
804804
(not (Stdlib.( == ) (Obj.magic x : 'a Js.null) Js.null))))
@@ -847,7 +847,7 @@
847847
let len = Js.Array.length array in
848848
if Stdlib.( > ) len 0 then
849849
let tag = Js.Array.unsafe_get array 0 in
850-
if Js.typeof tag = "string" then
850+
if Stdlib.( = ) (Js.typeof tag) "string" then
851851
let tag = (Obj.magic tag : string) in
852852
if Stdlib.( = ) tag "A" then (
853853
if Stdlib.( <> ) len 2 then
@@ -857,7 +857,7 @@
857857
if
858858
not
859859
(Stdlib.( && )
860-
(Js.typeof fs = "object")
860+
(Stdlib.( = ) (Js.typeof fs) "object")
861861
(Stdlib.( && )
862862
(not (Js.Array.isArray fs))
863863
(not

0 commit comments

Comments
 (0)