summaryrefslogtreecommitdiff
path: root/test/files/pos/testcast.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/testcast.scala')
-rw-r--r--test/files/pos/testcast.scala9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/files/pos/testcast.scala b/test/files/pos/testcast.scala
index 6482ed0a6d..15aa01ba72 100644
--- a/test/files/pos/testcast.scala
+++ b/test/files/pos/testcast.scala
@@ -2,22 +2,25 @@ package test;
class A;
-class B {
+class B extends A {
def foo: int = 1;
}
+object B {
+ def view(x: B): B1 = null;
+}
+
class B1 {
def bar: int = 1
}
object C {
- def view(x: B): B1 = null;
+ def view(x: A): B1 = null;
}
object Test {
import C.view;
val b: B = null;
- System.out.println(C.view(b).bar);
System.out.println(b.bar);
}