Merge pull request #2487 from endragor/rational-cmp-procvar

Add procvar pragma to rationals.cmp
This commit is contained in:
Andreas Rumpf
2015-04-08 09:57:14 +02:00

View File

@@ -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