From 37120df19265da923703de00911e33937e5a66de Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 13 Apr 2017 11:00:37 +0200 Subject: Add test --- tests/pos/i2234.scala | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/pos/i2234.scala diff --git a/tests/pos/i2234.scala b/tests/pos/i2234.scala new file mode 100644 index 000000000..8173c2091 --- /dev/null +++ b/tests/pos/i2234.scala @@ -0,0 +1,13 @@ +object Test { + type Dummy[A] = A + + def a(d: Dummy[String]) = () + def a(d: Dummy[Int]) = () + + implicit def dummy[A]: Dummy[A] = null.asInstanceOf[A] + def m(x: List[String])(implicit d: Dummy[String]) = "string" + def m(x: List[Int])(implicit d: Dummy[Int]) = "int" + + m(List(1, 2, 3)) + m(List("a")) +} -- cgit v1.2.3