aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-04-13 11:00:37 +0200
committerFelix Mulder <felix.mulder@gmail.com>2017-04-18 16:55:39 +0200
commit37120df19265da923703de00911e33937e5a66de (patch)
treee476fc785d0df6d138e44a3e6c7dea411f649cd3
parent02cffa49ede84dbd0dbb93329c9a4117251ca658 (diff)
downloaddotty-37120df19265da923703de00911e33937e5a66de.zip
dotty-37120df19265da923703de00911e33937e5a66de.tar.gz
dotty-37120df19265da923703de00911e33937e5a66de.tar.bz2
Add test
-rw-r--r--tests/pos/i2234.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/pos/i2234.scala b/tests/pos/i2234.scala
new file mode 100644
index 0000000..8173c20
--- /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"))
+}