diff options
author | Martin Odersky <odersky@gmail.com> | 2011-04-13 15:07:21 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2011-04-13 15:07:21 +0000 |
commit | 514d01c1ce9219a10f37d50a39cfeb420d76e38c (patch) | |
tree | f63d82982a4973ab8117b7dcc0730b3723a8264f /test/pending/run/t4283/IllegalAccess.scala | |
parent | 703bbdae73800e49d737e133e3a05929005294fc (diff) | |
download | scala-514d01c1ce9219a10f37d50a39cfeb420d76e38c.tar.gz scala-514d01c1ce9219a10f37d50a39cfeb420d76e38c.tar.bz2 scala-514d01c1ce9219a10f37d50a39cfeb420d76e38c.zip |
Fixes my part of #4283 by inserting another cas...
Fixes my part of #4283 by inserting another cast pre-emptively when an
IllegalAccess error is possible in an erasure-inserted cast. Review by
extempore.
Diffstat (limited to 'test/pending/run/t4283/IllegalAccess.scala')
-rw-r--r-- | test/pending/run/t4283/IllegalAccess.scala | 14 |
1 files changed, 13 insertions, 1 deletions
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) + } } |