diff options
Diffstat (limited to 'test/files')
-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())) + } + +} |