blob: c8a2faa671973b2cfd8ad5f2489ec480e3a6f919 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
package test;
object Test extends Application {
type Bar;
trait FooImpl;
trait Bob {
def bar : Bar with FooImpl;
}
def ifn[A,B](a : A)(f : A => B) =
if (a != null) f(a) else null;
val bob : Bob = null;
val bar = ifn(bob)(.bar);
assert(bar == null);
}
|