From 4cb43c77880464a629fd8f8687692d7824de6285 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 1 Dec 2006 17:33:43 +0000 Subject: fixed bug845 --- test/files/pos/bug845.scala | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/files/pos/bug845.scala (limited to 'test') diff --git a/test/files/pos/bug845.scala b/test/files/pos/bug845.scala new file mode 100644 index 0000000000..c8a2faa671 --- /dev/null +++ b/test/files/pos/bug845.scala @@ -0,0 +1,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); +} -- cgit v1.2.3