mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-31 02:12:11 +00:00
Merge pull request #2487 from endragor/rational-cmp-procvar
Add 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