From 5876e8c62130b4089b146d4fea5bcd926e47bf6f Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Thu, 9 Jan 2014 13:58:09 +0100 Subject: [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. --- test/files/run/t8114.scala | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/files/run/t8114.scala (limited to 'test/files') 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 +} -- cgit v1.2.3