diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2013-12-07 09:44:28 -0800 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2013-12-07 09:44:28 -0800 |
commit | a774157a4b666f29b7cd4bd958ea1ac150380959 (patch) | |
tree | e622af0c9b1699df6fa68f9a37457077dba3d0c1 /test | |
parent | f6c68461e16a8bef951f7bca9eaf6ab0249d7fd1 (diff) | |
parent | 9036f774bc834acd5b71484d2fa3882896ffd3ce (diff) | |
download | scala-a774157a4b666f29b7cd4bd958ea1ac150380959.tar.gz scala-a774157a4b666f29b7cd4bd958ea1ac150380959.tar.bz2 scala-a774157a4b666f29b7cd4bd958ea1ac150380959.zip |
Merge pull request #3223 from retronym/ticket/8010-2.10.x
SI-8010 Fix regression in erasure double definition checks
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/t8010.scala | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/files/run/t8010.scala b/test/files/run/t8010.scala new file mode 100644 index 0000000000..8636bbd12e --- /dev/null +++ b/test/files/run/t8010.scala @@ -0,0 +1,22 @@ +trait Base { + def t = 1 + def t(n: Int) = n + def bt = 2 + def bt(n: Int) = n +} +trait Derived extends Base { + // was: double defintion error + override def t = 1 + super.t + override def t(n: Int) = 1 + super.t(n) + override def bt = 1 + super.bt + override def bt(n: Int) = 1 + super.bt(n) +} + +object Test extends App { + val d = new Derived {} + // not the focus of thie bug, but let's just check the runtime behaviour while we're here. + assert(d.t == 2) + assert(d.t(1) == 2) + assert(d.bt == 3) + assert(d.bt(1) == 2) +} |