diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-01-09 13:58:09 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-01-09 14:16:03 +0100 |
commit | 5876e8c62130b4089b146d4fea5bcd926e47bf6f (patch) | |
tree | c266a266987656f3165daab6ba67be9c1f437449 /test/files | |
parent | 1f2cd7e5120bb22b14ad81adf8fb09caa5af2853 (diff) | |
download | scala-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')
-rw-r--r-- | test/files/run/t8114.scala | 15 |
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 +} |