Files
Nim/tests/proc/tinvalid_cmp_op2.nim
2026-06-08 09:00:00 +02:00

13 lines
327 B
Nim

discard """
cmd: "nim check $file"
action: compile
nimout: '''
tinvalid_cmp_op2.nim(12, 1) Warning: define `<` instead of `>` to implement user defined comparison operator. it allows you to use `>` automatically. [InvalidCmpOp]
'''
"""
# issue #25655
type Foo = distinct int
func `>`(a, b: Foo): bool = int(a) > int(b)