summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-10-09 05:13:24 -0700
committerJason Zaugg <jzaugg@gmail.com>2013-10-09 05:13:24 -0700
commit810ce7e2790e4da4e3f1d9473ccad5a721847096 (patch)
tree2cba192a70b5a932363d47b7b4491af1bd89ec46 /test/files/run
parent185ff4c929645a14fcfe77b6bcdea2bc28ece100 (diff)
parente609f1f20b0dce4905271b92aebd0298c7862859 (diff)
downloadscala-810ce7e2790e4da4e3f1d9473ccad5a721847096.tar.gz
scala-810ce7e2790e4da4e3f1d9473ccad5a721847096.tar.bz2
scala-810ce7e2790e4da4e3f1d9473ccad5a721847096.zip
Merge pull request #3020 from paulp/pr/overriding-pairs
Generalize OverridingPairs to SymbolPairs.
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/private-override.check1
-rw-r--r--test/files/run/private-override.scala17
2 files changed, 18 insertions, 0 deletions
diff --git a/test/files/run/private-override.check b/test/files/run/private-override.check
new file mode 100644
index 0000000000..00750edc07
--- /dev/null
+++ b/test/files/run/private-override.check
@@ -0,0 +1 @@
+3
diff --git a/test/files/run/private-override.scala b/test/files/run/private-override.scala
new file mode 100644
index 0000000000..0a3f57f97c
--- /dev/null
+++ b/test/files/run/private-override.scala
@@ -0,0 +1,17 @@
+package test.p1.p2 {
+ abstract class A {
+ private[p2] def f2(): Int = 1
+ }
+ abstract class Other extends A {
+ // It's a private method - not a private[p2] method. Not a failed
+ // "weaker access privileges" override, a different namespace.
+ private def f2(): Int = super.f2() + 2
+ def go() = f2()
+ }
+}
+
+object Test extends test.p1.p2.Other {
+ def main(args: Array[String]): Unit = {
+ println(go())
+ }
+}