diff options
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); +} |