summaryrefslogtreecommitdiff
path: root/test-nsc/files/pos/testcast.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2005-10-06 13:14:33 +0000
committerMartin Odersky <odersky@gmail.com>2005-10-06 13:14:33 +0000
commit25a98964b5109aa55b71a8a26886c59903193548 (patch)
tree84b8fa154b5a0a2f36accd43d8d35926f6ba8579 /test-nsc/files/pos/testcast.scala
parent3b81e0cbac2fe51226472949ecde4d81b0e95412 (diff)
downloadscala-25a98964b5109aa55b71a8a26886c59903193548.tar.gz
scala-25a98964b5109aa55b71a8a26886c59903193548.tar.bz2
scala-25a98964b5109aa55b71a8a26886c59903193548.zip
*** empty log message ***
Diffstat (limited to 'test-nsc/files/pos/testcast.scala')
-rwxr-xr-xtest-nsc/files/pos/testcast.scala26
1 files changed, 26 insertions, 0 deletions
diff --git a/test-nsc/files/pos/testcast.scala b/test-nsc/files/pos/testcast.scala
new file mode 100755
index 0000000000..631b2c922b
--- /dev/null
+++ b/test-nsc/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);
+}