This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
43
unikernel/duniverse/ppx_compare/test/errors.mlt
Normal file
43
unikernel/duniverse/ppx_compare/test/errors.mlt
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
open Ppx_compare_lib.Builtin
|
||||
|
||||
type t =
|
||||
{ x : int [@compare.ignore]
|
||||
; y : int
|
||||
}
|
||||
[@@deriving equal]
|
||||
|
||||
[%%expect
|
||||
{|
|
||||
Line _, characters _-_:
|
||||
Error: Cannot use [@compare.ignore] with [@@deriving equal]
|
||||
|}]
|
||||
|
||||
type t =
|
||||
{ x : int [@equal.ignore]
|
||||
; y : int
|
||||
}
|
||||
[@@deriving compare, equal]
|
||||
|
||||
[%%expect
|
||||
{|
|
||||
Line _, characters _-_:
|
||||
Error: Cannot use [@equal.ignore] with [@@deriving compare].
|
||||
|}]
|
||||
|
||||
(* The following ones are OK: *)
|
||||
|
||||
type t =
|
||||
{ x : int [@compare.ignore] [@equal.ignore]
|
||||
; y : int
|
||||
}
|
||||
[@@deriving compare, equal]
|
||||
|
||||
[%%expect {| |}]
|
||||
|
||||
type t =
|
||||
{ x : int [@ignore]
|
||||
; y : int
|
||||
}
|
||||
[@@deriving compare, equal]
|
||||
|
||||
[%%expect {| |}]
|
||||
Loading…
Add table
Add a link
Reference in a new issue