Skip to content

Commit ce877b3

Browse files
authored
fix test compilation in release mode (#262)
in release mode, ppx_expect is stripped out and this fails to build due to the value restriction: ``` File "test/test_scheduling.ml", line 870, characters 4-13: 870 | let pp_forget = ^^^^^^^^^ Error: The type of this expression, ('_weak1, [< `Still_connected | `Unknown_worker ] as '_weak2) result Fmt.t, contains the non-generalizable type variable(s): '_weak1, '_weak2. (see manual section 6.1.2) ``` An eta expansion suffices to fix it
1 parent c1dba36 commit ce877b3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/test_scheduling.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -867,12 +867,12 @@ let%expect_test "persist_pause" =
867867
Pool.release w1;
868868
Lwt.return_unit
869869

870-
let pp_forget =
870+
let pp_forget f x =
871871
let pp_forget_error f = function
872872
| `Still_connected -> Fmt.string f "still connected"
873873
| `Unknown_worker -> Fmt.string f "unknown worker"
874874
in
875-
Fmt.(result ~ok:(const string "ok")) ~error:pp_forget_error
875+
Fmt.(result ~ok:(const string "ok")) ~error:pp_forget_error f x
876876

877877
(* Forgetting workers. *)
878878
let%expect_test "forget" =

0 commit comments

Comments
 (0)