diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2012-06-10 23:38:39 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2012-06-11 00:07:24 +0200 |
commit | 617706644139d5731b10b3c77c647e3b70aa07b3 (patch) | |
tree | 86c90bc0192870477747adf38ff3f6daab57af2f /test/files/run/t5162.scala | |
parent | 30ef129f322687cbc885d344ca73dd4877fbedd6 (diff) | |
download | scala-617706644139d5731b10b3c77c647e3b70aa07b3.tar.gz scala-617706644139d5731b10b3c77c647e3b70aa07b3.tar.bz2 scala-617706644139d5731b10b3c77c647e3b70aa07b3.zip |
SI-5162 Exclude super.foo from the erasure cast of SI-4283
If the target method is defined in Java, treat the super reference
as an error, otherwise allow it in the knowledge that Scala loosens
the access restrictions on its generated classes.
Moves the test for that bug out of pending-ville. It's sufficient
to place Test in the empty package to exercise the right code paths.
Diffstat (limited to 'test/files/run/t5162.scala')
-rw-r--r-- | test/files/run/t5162.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/files/run/t5162.scala b/test/files/run/t5162.scala new file mode 100644 index 0000000000..4f91932b6e --- /dev/null +++ b/test/files/run/t5162.scala @@ -0,0 +1,19 @@ +// In run, rather than pos, to check for problems like SI-4283 +object O1 { + private[O1] class Base { + def foo: Int = 0 + } + class Mediator extends Base +} + +object O2 { + class Derived extends O1.Mediator { + override def foo: Int = super.foo + } +} + +object Test { + def main(args: Array[String]) { + new O2.Derived().foo + } +} |