From e8c4e922e22e3db2dbd342e54e38e052ebf325f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Westk=C3=A4mper?= Date: Wed, 6 Oct 2010 20:35:04 +0000 Subject: [PATCH] --- .../com/mysema/testutil/ImplicitsTest.scala | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/querydsl-scala/src/test/scala/com/mysema/testutil/ImplicitsTest.scala b/querydsl-scala/src/test/scala/com/mysema/testutil/ImplicitsTest.scala index b5bf14de7..c57e4d91e 100644 --- a/querydsl-scala/src/test/scala/com/mysema/testutil/ImplicitsTest.scala +++ b/querydsl-scala/src/test/scala/com/mysema/testutil/ImplicitsTest.scala @@ -8,7 +8,9 @@ class ImplicitsTest { implicit def toStringWrapper(str: String) = new StringWrapper(str); - implicit def toIntWrapper(num: Integer) = new IntegerWrapper(num); + implicit def toIntegerWrapper(num: Integer) = new IntegerWrapper(num); + + implicit def toIntWrapper(num: Int) = new IntWrapper(num); @Test def stringValue(){ @@ -16,9 +18,17 @@ class ImplicitsTest { } @Test - def intValue(){ + def integerValue(){ val num: Integer = 1; - val res: Predicate = num < 3; + val res1: Predicate = num < 3; + val res2: Predicate = num lt 3; + } + + @Test + def intValue(){ + val num: Int = 1; + val res1: Predicate = num < 3; + val res2: Predicate = num lt 3; } } @@ -32,6 +42,15 @@ class StringWrapper(str: String){ class IntegerWrapper(num: Integer){ def <(other: Integer): Predicate = null; + + def lt(other: Integer): Predicate = null; +} + +class IntWrapper(num: Int){ + + def <(other: Integer): Predicate = null; + + def lt(other: Integer): Predicate = null; } trait Predicate \ No newline at end of file