Merge pull request #2487 from endragor/rational-cmp-procvar
Add procvar pragma to rationals.cmp
This commit is contained in:
commit
a4bbcf5ab0
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue