mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-13 06:43:52 +00:00
Added procvar pragma to rationals.cmp
This commit is contained in:
@@ -188,7 +188,7 @@ proc `/=`*[T](x: var Rational[T], y: T) =
|
||||
x.den *= y
|
||||
reduce(x)
|
||||
|
||||
proc cmp*(x, y: Rational): int =
|
||||
proc cmp*(x, y: Rational): int {.procvar.} =
|
||||
## Compares two rationals.
|
||||
(x - y).num
|
||||
|
||||
|
||||
Reference in New Issue
Block a user