summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-01-09 13:58:09 +0100
committerJason Zaugg <jzaugg@gmail.com>2014-01-09 14:16:03 +0100
commit5876e8c62130b4089b146d4fea5bcd926e47bf6f (patch)
treec266a266987656f3165daab6ba67be9c1f437449 /test/files/run
parent1f2cd7e5120bb22b14ad81adf8fb09caa5af2853 (diff)
downloadscala-5876e8c62130b4089b146d4fea5bcd926e47bf6f.tar.gz
scala-5876e8c62130b4089b146d4fea5bcd926e47bf6f.tar.bz2
scala-5876e8c62130b4089b146d4fea5bcd926e47bf6f.zip
[nomaster] SI-8114 Binary compat. workaround for erasure bug SI-7120
We can't backport SI-7120 to 2.10.x as it changes erased signatures, which can lead to interop problems between 2.10.3 and 2.10.4. But, we can detect one of the nasty symptoms -- a bridge method with the same signature as its target -- and treat that. This commit detects duplicate bridges in the ASM (only) backend and removes them.
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/t8114.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/run/t8114.scala b/test/files/run/t8114.scala
new file mode 100644
index 0000000000..ecbca37d2a
--- /dev/null
+++ b/test/files/run/t8114.scala
@@ -0,0 +1,15 @@
+class AbstractTable[T] { type TableElementType }
+class Table[T] extends AbstractTable[T] { type TableElementType = T }
+
+class Query[E, U]
+class TableQuery[E <: AbstractTable[_]] extends Query[E, E#TableElementType]
+
+object Test extends App {
+ object MyTable extends TableQuery[Table[Long]]
+
+ def list[R](q: Query[_, R]): List[R] = Nil
+ list/*[Long]*/(MyTable) collect { case x => x }
+
+ // Generates a redundant bridge method (double definition error)
+ // in 2.10.x due to (at least) the bug in erasure fixed in SI-7120
+}