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.scala26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/files/pos/testcast.scala b/test/files/pos/testcast.scala
new file mode 100644
index 0000000000..631b2c922b
--- /dev/null
+++ b/test/files/pos/testcast.scala
@@ -0,0 +1,26 @@
+package test;
+
+class A;
+
+class B extends A {
+ def foo: int = 1;
+}
+
+object B {
+ def view(x: B): B1 = null;
+}
+
+class B1 {
+ def bar: int = 1
+}
+
+object C {
+ implicit def view(x: A): B1 = null;
+}
+object Test {
+ import C.view;
+
+ val b: B = null;
+
+ System.out.println(b.bar);
+}