diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t6385.check | 7 | ||||
-rw-r--r-- | test/files/neg/t6385.scala | 13 |
2 files changed, 20 insertions, 0 deletions
diff --git a/test/files/neg/t6385.check b/test/files/neg/t6385.check new file mode 100644 index 0000000000..93e51e8927 --- /dev/null +++ b/test/files/neg/t6385.check @@ -0,0 +1,7 @@ +t6385.scala:12: error: bridge generated for member method x: ()C[T] in class C +which overrides method x: ()C[T] in trait AA +clashes with definition of the member itself; +both have erased type ()Object + def x = this + ^ +one error found diff --git a/test/files/neg/t6385.scala b/test/files/neg/t6385.scala new file mode 100644 index 0000000000..cec58eec9e --- /dev/null +++ b/test/files/neg/t6385.scala @@ -0,0 +1,13 @@ +object N { + def main(args: Array[String]) { + val y: AA[Int] = C(2) + val c: Int = y.x.y + println(c) + } +} +trait AA[T] extends Any { + def x: C[T] +} +case class C[T](val y: T) extends AnyVal with AA[T] { + def x = this +} |