diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2008-04-22 16:55:22 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2008-04-22 16:55:22 +0000 |
commit | d8342f44a77d0cb2780c1681e114fe2258a3dcb4 (patch) | |
tree | 5cbd6fb279ae17ac9b8ce855801754e0719097fd /test/files/jvm | |
parent | 9a78b52ba3141c8893641919ec1a3c541e3c6330 (diff) | |
download | scala-d8342f44a77d0cb2780c1681e114fe2258a3dcb4.tar.gz scala-d8342f44a77d0cb2780c1681e114fe2258a3dcb4.tar.bz2 scala-d8342f44a77d0cb2780c1681e114fe2258a3dcb4.zip |
Fixed protected accessor for inherited java mem...
Fixed protected accessor for inherited java members in traits (see
ticket #151).
Diffstat (limited to 'test/files/jvm')
-rw-r--r-- | test/files/jvm/protectedacc.check | 1 | ||||
-rw-r--r-- | test/files/jvm/protectedacc.scala | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/test/files/jvm/protectedacc.check b/test/files/jvm/protectedacc.check index aaac0d613e..d36d85fef8 100644 --- a/test/files/jvm/protectedacc.check +++ b/test/files/jvm/protectedacc.check @@ -13,3 +13,4 @@ count after: 4 meth1(1) = 2 meth2(1)(1) = 10 100 = 100 +Foo 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 { |