diff options
-rw-r--r-- | config/list/test-neg.lst | 1 | ||||
-rw-r--r-- | test/files/neg/bugs.check | 6 | ||||
-rw-r--r-- | test/files/neg/bugs.scala | 18 |
3 files changed, 25 insertions, 0 deletions
diff --git a/config/list/test-neg.lst b/config/list/test-neg.lst index 545a264160..7344d3f3b5 100644 --- a/config/list/test-neg.lst +++ b/config/list/test-neg.lst @@ -22,6 +22,7 @@ neg/bug67.scala neg/bug72.scala neg/bug74.scala neg/bug75.scala +neg/bugs.scala neg/constrparams.scala neg/cyclic.scala neg/doubledefs.scala diff --git a/test/files/neg/bugs.check b/test/files/neg/bugs.check new file mode 100644 index 0000000000..d597a199f5 --- /dev/null +++ b/test/files/neg/bugs.check @@ -0,0 +1,6 @@ +bugs.scala:11: overlapping overloaded alternatives; the two following alternatives of method p have the same erasure: ((Tuple2[Boolean,Boolean]) => Boolean)int + alternative 1: def p((scala.Tuple2[scala.Boolean,scala.Boolean]) => scala.Boolean): scala.Int(1) + alternative 2: def p((scala.List[scala.Any]) => scala.Boolean): scala.Int(2) + def p(f:List[Any] => Boolean) = 2; + ^ +one error found diff --git a/test/files/neg/bugs.scala b/test/files/neg/bugs.scala new file mode 100644 index 0000000000..b41de26ea4 --- /dev/null +++ b/test/files/neg/bugs.scala @@ -0,0 +1,18 @@ +//############################################################################ +// Bugs +//############################################################################ +// $Id$ + +//############################################################################ +// Bug 271 + +object Bug271P { + def p(f:Tuple2[Boolean,Boolean] => Boolean) = 1; + def p(f:List[Any] => Boolean) = 2; +} + +object Bug271Test with Application { + Console.println(Bug271P.p((x:List[Any])=>true)); +} + +//############################################################################ |