summaryrefslogtreecommitdiff
path: root/test/files/pos/testcast.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2004-03-26 13:35:11 +0000
committerMartin Odersky <odersky@gmail.com>2004-03-26 13:35:11 +0000
commit13005976275b6f629b9cce2138df189a532f43c3 (patch)
tree474c767cd24487286e7bf6d384187778422477f8 /test/files/pos/testcast.scala
parentae8b367bfe69cd28e1f07c628c713c52c5589c9b (diff)
downloadscala-13005976275b6f629b9cce2138df189a532f43c3.tar.gz
scala-13005976275b6f629b9cce2138df189a532f43c3.tar.bz2
scala-13005976275b6f629b9cce2138df189a532f43c3.zip
*** empty log message ***
Diffstat (limited to 'test/files/pos/testcast.scala')
-rw-r--r--test/files/pos/testcast.scala23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/files/pos/testcast.scala b/test/files/pos/testcast.scala
new file mode 100644
index 0000000000..6482ed0a6d
--- /dev/null
+++ b/test/files/pos/testcast.scala
@@ -0,0 +1,23 @@
+package test;
+
+class A;
+
+class B {
+ def foo: int = 1;
+}
+
+class B1 {
+ def bar: int = 1
+}
+
+object C {
+ def view(x: B): B1 = null;
+}
+object Test {
+ import C.view;
+
+ val b: B = null;
+
+ System.out.println(C.view(b).bar);
+ System.out.println(b.bar);
+}