diff options
-rw-r--r-- | test/files/run/bugs.check | 3 | ||||
-rw-r--r-- | test/files/run/bugs.scala | 14 |
2 files changed, 17 insertions, 0 deletions
diff --git a/test/files/run/bugs.check b/test/files/run/bugs.check index bdada64123..d0ba581888 100644 --- a/test/files/run/bugs.check +++ b/test/files/run/bugs.check @@ -76,3 +76,6 @@ hello 4 >>> bug 266 +<<< bug 316 +>>> bug 316 + diff --git a/test/files/run/bugs.scala b/test/files/run/bugs.scala index 63ee85ef47..3866bd72f5 100644 --- a/test/files/run/bugs.scala +++ b/test/files/run/bugs.scala @@ -367,6 +367,19 @@ object Bug266Test { } //############################################################################ +// Bug 316 + +class Bug316MyIterator with Iterator[Int] { + def hasNext = false; + def next = 42; +} + +object Bug316Test { + def main(args: Array[String]): Unit = + (new Bug316MyIterator) filter { x: Int => x == 1 }; +} + +//############################################################################ // Main object Test { @@ -409,6 +422,7 @@ object Test { test(250, Bug250Test.main(args)); test(257, Bug257Test.main(args)); test(266, Bug266Test.main(args)); + test(316, Bug316Test.main(args)); if (errors > 0) { System.out.println(); |