diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/new/implicits.scala | 9 | ||||
-rw-r--r-- | tests/pos/implicits1.scala | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/new/implicits.scala b/tests/new/implicits.scala new file mode 100644 index 000000000..1a3e0b4da --- /dev/null +++ b/tests/new/implicits.scala @@ -0,0 +1,9 @@ +object Test { + + class X(i: Int) + + implicit def int2x(i: Int): X = new X(i) + + val x: X = Byte.MinValue + +} diff --git a/tests/pos/implicits1.scala b/tests/pos/implicits1.scala index d8ca76de5..eda134663 100644 --- a/tests/pos/implicits1.scala +++ b/tests/pos/implicits1.scala @@ -36,6 +36,8 @@ object Implicits { val d: Int = z.foo("abc") + val x: X = Byte.MinValue + //import X.BarDeco println(z.bar) @@ -50,4 +52,6 @@ object Implicits { val s: Modifier = Some("rd").getOrElse("") + val xx: Int = (1: Byte) + } |