diff options
Diffstat (limited to 'test/files/run/t4283')
-rw-r--r-- | test/files/run/t4283/AbstractFoo.java | 6 | ||||
-rw-r--r-- | test/files/run/t4283/ScalaBipp.scala | 5 | ||||
-rw-r--r-- | test/files/run/t4283/Test.scala | 16 |
3 files changed, 27 insertions, 0 deletions
diff --git a/test/files/run/t4283/AbstractFoo.java b/test/files/run/t4283/AbstractFoo.java new file mode 100644 index 0000000000..0403271b74 --- /dev/null +++ b/test/files/run/t4283/AbstractFoo.java @@ -0,0 +1,6 @@ +package test; + +/* package private */ class AbstractFoo { + public int t = 1; + public int f() { return 2; } +}
\ No newline at end of file diff --git a/test/files/run/t4283/ScalaBipp.scala b/test/files/run/t4283/ScalaBipp.scala new file mode 100644 index 0000000000..36dea9f4de --- /dev/null +++ b/test/files/run/t4283/ScalaBipp.scala @@ -0,0 +1,5 @@ +package test + +class ScalaBipp extends AbstractFoo { + def make: Option[ScalaBipp] = Option(this) +} diff --git a/test/files/run/t4283/Test.scala b/test/files/run/t4283/Test.scala new file mode 100644 index 0000000000..af72fa62f9 --- /dev/null +++ b/test/files/run/t4283/Test.scala @@ -0,0 +1,16 @@ +object Test { + + 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) + } +} |