summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@typesafe.com>2014-11-10 13:25:02 +0100
committerLukas Rytz <lukas.rytz@typesafe.com>2014-11-10 13:25:02 +0100
commit60f009f47cc5bc36227f9b9ddc0f7df37345ce14 (patch)
tree7132f538ee3830aee8d120ba644ae6f9cbd9a7b1 /test/files/run
parentfa060913caca2b46a2a894b35a53079eb33927c6 (diff)
parentda22a43cc0210363e4aea47fbc06075248f333d7 (diff)
downloadscala-60f009f47cc5bc36227f9b9ddc0f7df37345ce14.tar.gz
scala-60f009f47cc5bc36227f9b9ddc0f7df37345ce14.tar.bz2
scala-60f009f47cc5bc36227f9b9ddc0f7df37345ce14.zip
Merge pull request #4109 from retronym/ticket/1994
SI-1994 Test case for fixed overriding problem
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/t1994.scala20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/files/run/t1994.scala b/test/files/run/t1994.scala
new file mode 100644
index 0000000000..0b463e3444
--- /dev/null
+++ b/test/files/run/t1994.scala
@@ -0,0 +1,20 @@
+class A {
+ protected def x = 0
+ protected[A] def y = 0
+}
+
+class B extends A {
+ override def x = 1
+ def superY = super[A].y
+ override def y = 1
+}
+
+
+object Test {
+ def main(args: Array[String]): Unit = {
+ val b = new B
+ assert(b.x == 1)
+ assert(b.y == 1)
+ assert(b.superY == 0)
+ }
+}