aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/i2234.scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2017-04-18 17:28:40 +0200
committerGitHub <noreply@github.com>2017-04-18 17:28:40 +0200
commit6a0c581d24581cee19dd5448b1d6821f0538f0ca (patch)
treee476fc785d0df6d138e44a3e6c7dea411f649cd3 /tests/pos/i2234.scala
parentab124cb8cda3ab65b0195f1a7f74006c24ebe7ab (diff)
parent37120df19265da923703de00911e33937e5a66de (diff)
downloaddotty-6a0c581d24581cee19dd5448b1d6821f0538f0ca.tar.gz
dotty-6a0c581d24581cee19dd5448b1d6821f0538f0ca.tar.bz2
dotty-6a0c581d24581cee19dd5448b1d6821f0538f0ca.zip
Merge pull request #2236 from dotty-staging/fix-#2234
Fix #2234: Dealias before type erasing
Diffstat (limited to 'tests/pos/i2234.scala')
-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 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"))
+}