diff options
author | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2012-05-09 22:33:09 +0200 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2012-05-14 13:50:51 +0200 |
commit | 18efdedfb97de7ca9f6f6ce385194d5a6902769d (patch) | |
tree | 7eb62207e8dbb1932445cf561fe4e4c04cd43de3 /test/files/run | |
parent | 97046e6cbe8dfc5d5b672d1a490071b68cbdad9a (diff) | |
download | scala-18efdedfb97de7ca9f6f6ce385194d5a6902769d.tar.gz scala-18efdedfb97de7ca9f6f6ce385194d5a6902769d.tar.bz2 scala-18efdedfb97de7ca9f6f6ce385194d5a6902769d.zip |
Better fix for SI-5676. Review by @paulp
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t5676.check | 3 | ||||
-rw-r--r-- | test/files/run/t5676.flags | 1 | ||||
-rw-r--r-- | test/files/run/t5676.scala | 24 |
3 files changed, 28 insertions, 0 deletions
diff --git a/test/files/run/t5676.check b/test/files/run/t5676.check new file mode 100644 index 0000000000..3b562d3046 --- /dev/null +++ b/test/files/run/t5676.check @@ -0,0 +1,3 @@ +ok +false +true diff --git a/test/files/run/t5676.flags b/test/files/run/t5676.flags new file mode 100644 index 0000000000..e1b37447c9 --- /dev/null +++ b/test/files/run/t5676.flags @@ -0,0 +1 @@ +-Xexperimental
\ No newline at end of file diff --git a/test/files/run/t5676.scala b/test/files/run/t5676.scala new file mode 100644 index 0000000000..b643c300ce --- /dev/null +++ b/test/files/run/t5676.scala @@ -0,0 +1,24 @@ +import java.lang.reflect.Modifier + +class Bar[T] + +class Foo[T] { + object A extends Bar[T] +} + +class Baz[S] extends Foo[S] { + override object A extends Bar[S] { + def foo(): String = "ok" + } +} + +object Test { + + def main(a: Array[String]) { + val b = new Baz[Any] + println(b.A.foo()) + println(Modifier.isFinal(classOf[Baz[Any]].getModifiers())) + println(Modifier.isFinal(Test.getClass.getModifiers())) + } + +} |