Skip to content

Commit 1302188

Browse files
more ppx test re constraints
1 parent b935bf7 commit 1302188

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

test/ppx/main.ml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,22 @@ let suite = suite "ppx" [
181181
let%lwt _ : _ = Lwt.return 0 in
182182
Lwt.return_true
183183
) ;
184+
185+
(* offband report of bug, doesn't trigger but let's add to the testsuite anyway *)
186+
test "record-field-infer"
187+
(fun () ->
188+
let module M = struct type t = { a : int; b : int } end in
189+
let module MM = struct type t = { a : float; b : char; } end in
190+
let%lwt { a = _; _ } : M.t = Lwt.return { M.a = 0; b = 0 } in
191+
Lwt.return_true
192+
)[@ocaml.warning "-34-69"] ;
193+
test "record-field-infer-brckt"
194+
(fun () ->
195+
let module M = struct type t = { a : int; b : int } end in
196+
let module MM = struct type t = { a : float; b : char; } end in
197+
let%lwt ({ a = _; _ } : M.t) = Lwt.return { M.a = 0; b = 0 } in
198+
Lwt.return_true
199+
)[@ocaml.warning "-34-69"] ;
184200
]
185201

186202
let _ = Test.run "ppx" [ suite ]

0 commit comments

Comments
 (0)