diff options
Diffstat (limited to 'src/library/scala/Fractional.scala')
-rwxr-xr-x | src/library/scala/Fractional.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/library/scala/Fractional.scala b/src/library/scala/Fractional.scala index 81366a80b9..c8905ce5fd 100755 --- a/src/library/scala/Fractional.scala +++ b/src/library/scala/Fractional.scala @@ -2,4 +2,9 @@ package scala trait Fractional[T] extends Numeric[T] { def div(x: T, y: T): T + + class FractionalOps(lhs: T) extends Ops(lhs) { + def /(rhs: T) = div(lhs, rhs) + } + override implicit def mkNumericOps(lhs: T): FractionalOps = new FractionalOps(lhs) } |