diff options
Diffstat (limited to 'test/pending')
-rw-r--r-- | test/pending/run/t4283/AbstractFoo.java | 3 | ||||
-rw-r--r-- | test/pending/run/t4283/IllegalAccess.scala | 14 |
2 files changed, 15 insertions, 2 deletions
diff --git a/test/pending/run/t4283/AbstractFoo.java b/test/pending/run/t4283/AbstractFoo.java index 6d4e8f4e22..0403271b74 100644 --- a/test/pending/run/t4283/AbstractFoo.java +++ b/test/pending/run/t4283/AbstractFoo.java @@ -1,5 +1,6 @@ package test; /* package private */ class AbstractFoo { - public int t; + public int t = 1; + public int f() { return 2; } }
\ No newline at end of file diff --git a/test/pending/run/t4283/IllegalAccess.scala b/test/pending/run/t4283/IllegalAccess.scala index e1bce15cf8..12de7e4649 100644 --- a/test/pending/run/t4283/IllegalAccess.scala +++ b/test/pending/run/t4283/IllegalAccess.scala @@ -1,5 +1,17 @@ package other object IllegalAccess { - val x = (new test.ScalaBipp).make.get.t // java.lang.IllegalAccessError: tried to access class test.AbstractFoo from class other.IllegalAccess$ + def main(args: Array[String]) { + val x = (new test.ScalaBipp).make.get.asInstanceOf[test.ScalaBipp].f() + println(x) + val y = (new test.ScalaBipp).make.get.f() + println(y) + val u = (new test.ScalaBipp).make.get.asInstanceOf[test.ScalaBipp].t + println(u) + val v = (new test.ScalaBipp).make.get.t + println(v) + val sb: test.ScalaBipp = (new test.ScalaBipp).make.get + val z = sb.t + println(z) + } } |