diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/t5676.check | 3 | ||||
-rw-r--r-- | test/files/run/t5676.flags (renamed from test/pending/run/t5676.flags) | 0 | ||||
-rw-r--r-- | test/files/run/t5676.scala | 24 | ||||
-rw-r--r-- | test/pending/run/t5676.scala | 25 |
4 files changed, 27 insertions, 25 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/pending/run/t5676.flags b/test/files/run/t5676.flags index e1b37447c9..e1b37447c9 100644 --- a/test/pending/run/t5676.flags +++ b/test/files/run/t5676.flags 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())) + } + +} diff --git a/test/pending/run/t5676.scala b/test/pending/run/t5676.scala deleted file mode 100644 index 3ff498eaa2..0000000000 --- a/test/pending/run/t5676.scala +++ /dev/null @@ -1,25 +0,0 @@ - - - - -class Bar[T] - - -class Foo[T] { - object A extends Bar[T] -} - - -class Baz[S] extends Foo[S] { - override object A extends Bar[S] -} - - -object Test { - - def main(a: Array[String]) { - val b = new Baz[Any] - println(b) - } - -} |