From fe9a10c9a0f088f8dc5c47b9cfda51864ec884cc Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Tue, 15 Mar 2011 20:41:57 +0000 Subject: Leveraged having a place to put some useful imp... Leveraged having a place to put some useful implicits which we sensibly are reluctant to introduce in the default scope. The test case pretty much sums it up. import Ordering.Implicits._ import Numeric.Implicits._ def f1[T: Numeric](x: T, y: T, z: T) = x + y + z def f2[T: Ordering](x: T, y: T, z: T) = if (x < y) (z > y) else (x < z) No review. --- test/files/pos/implicit-infix-ops.scala | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/files/pos/implicit-infix-ops.scala (limited to 'test/files') diff --git a/test/files/pos/implicit-infix-ops.scala b/test/files/pos/implicit-infix-ops.scala new file mode 100644 index 0000000000..ef4512fa6b --- /dev/null +++ b/test/files/pos/implicit-infix-ops.scala @@ -0,0 +1,7 @@ +object Test { + import Ordering.Implicits._ + import Numeric.Implicits._ + + def f1[T: Numeric](x: T, y: T, z: T) = x + y + z + def f2[T: Ordering](x: T, y: T, z: T) = if (x < y) (z > y) else (x < z) +} -- cgit v1.2.3