diff options
Diffstat (limited to 'test/files/jvm/protectedacc.scala')
-rw-r--r-- | test/files/jvm/protectedacc.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/jvm/protectedacc.scala b/test/files/jvm/protectedacc.scala index f5d05e21b4..59869c63ae 100644 --- a/test/files/jvm/protectedacc.scala +++ b/test/files/jvm/protectedacc.scala @@ -19,9 +19,25 @@ object Test { (new ji.Inner).m; (new p.b.OuterObj.Inner).m + cloneable.MainClone.run } } +package cloneable { +object MainClone { + trait Foo extends Cloneable { + def copy : Foo = clone.asInstanceOf[Foo] + override def toString = "Foo" + } + def run : Unit = { + val foo = new Foo {} + Console.println(foo.copy) + } +} + +} + + package p { package a { |