diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/bugs.check | 6 | ||||
-rw-r--r-- | test/files/neg/bugs.scala | 18 |
2 files changed, 24 insertions, 0 deletions
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)); +} + +//############################################################################ |