diff options
author | Martin Odersky <odersky@gmail.com> | 2005-10-06 13:14:33 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2005-10-06 13:14:33 +0000 |
commit | 25a98964b5109aa55b71a8a26886c59903193548 (patch) | |
tree | 84b8fa154b5a0a2f36accd43d8d35926f6ba8579 /test-nsc/files/pos/testcast.scala | |
parent | 3b81e0cbac2fe51226472949ecde4d81b0e95412 (diff) | |
download | scala-25a98964b5109aa55b71a8a26886c59903193548.tar.gz scala-25a98964b5109aa55b71a8a26886c59903193548.tar.bz2 scala-25a98964b5109aa55b71a8a26886c59903193548.zip |
*** empty log message ***
Diffstat (limited to 'test-nsc/files/pos/testcast.scala')
-rwxr-xr-x | test-nsc/files/pos/testcast.scala | 26 |
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); +} |