diff options
author | Paul Phillips <paulp@improving.org> | 2009-07-05 19:16:24 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-07-05 19:16:24 +0000 |
commit | c93f64f7ea35b53cdec95cad4891f7bd84604888 (patch) | |
tree | 1ebaa9aab371dc2042b6450b2a3f10e7691118e9 /test | |
parent | 67881bbca054809bc97af17cce1134affa02398f (diff) | |
download | scala-c93f64f7ea35b53cdec95cad4891f7bd84604888.tar.gz scala-c93f64f7ea35b53cdec95cad4891f7bd84604888.tar.bz2 scala-c93f64f7ea35b53cdec95cad4891f7bd84604888.zip |
Interim fix and test case for #1434.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/bug1434.scala | 15 |
1 files changed, 15 insertions, 0 deletions
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 |