summaryrefslogblamecommitdiff
path: root/test/files/neg/bug846.scala
blob: be105a71aab78ef0f4aa541ff824ee919dc21b24 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                      
package test;
trait Test {
  type Bar;
  trait FooImpl;
  trait Bob {
    def bar : Bar with FooImpl;
  }
  def ifn[A,B](a : A)(f : A => B): B =
    if (a != null) f(a) else null
  val bob : Bob = null;
  val bar = ifn(bob)(.bar);
  assert(bar == null);
}