From c93f64f7ea35b53cdec95cad4891f7bd84604888 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sun, 5 Jul 2009 19:16:24 +0000 Subject: Interim fix and test case for #1434. --- test/files/run/bug1434.scala | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/files/run/bug1434.scala (limited to 'test/files/run') diff --git a/test/files/run/bug1434.scala b/test/files/run/bug1434.scala new file mode 100644 index 0000000000..df869c7bcd --- /dev/null +++ b/test/files/run/bug1434.scala @@ -0,0 +1,15 @@ +object Test { + class A[T] { val op = null } + class B extends A[Any] + class C extends B + + def f(o: AnyRef) = o match { + case a: A[_] if(a.op != null) => "with op" + case c: C => "C" + case b: B => "B" + } + + def main(args: Array[String]) = { + assert("C" == f(new C)) + } +} \ No newline at end of file -- cgit v1.2.3