From 9a387fe59fb6a4f42599f5b6b2da7d911f0da793 Mon Sep 17 00:00:00 2001 From: paltherr Date: Tue, 25 Nov 2003 16:30:24 +0000 Subject: - Added bugs 217, 222 and 233 --- test/files/run/bugs.check | 10 ++++++++++ test/files/run/bugs.scala | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/test/files/run/bugs.check b/test/files/run/bugs.check index 178be45299..fc517ee474 100644 --- a/test/files/run/bugs.check +++ b/test/files/run/bugs.check @@ -32,9 +32,19 @@ ok <<< bug 213 >>> bug 213 +<<< bug 217 +>>> bug 217 + +<<< bug 222 +>>> bug 222 + <<< bug 225 >>> bug 225 <<< bug 226 >>> bug 226 +<<< bug 233 +true +>>> bug 233 + diff --git a/test/files/run/bugs.scala b/test/files/run/bugs.scala index b83053eef2..d80e5c1412 100644 --- a/test/files/run/bugs.scala +++ b/test/files/run/bugs.scala @@ -177,6 +177,28 @@ object Bug213Test { } } +//############################################################################ +// Bug 217 + +object Bug217Test { + def foo[t](fun: Function0[t]): t = fun(); + def bar(x: Int): Unit = { + foo(() => 0); + () + } + def main(args: Array[String]): Unit = bar(32); +} + +//############################################################################ +// Bug 222 + +object Bug222Test { + def main(args:Array[String]): Unit = { + val array: Array[String] = new Array(16); + () + } +} + //############################################################################ // Bug 225 @@ -208,6 +230,15 @@ object Bug226Test { } +//############################################################################ +// Bug 233 + +object Bug233Test { + val b: Array[String] = null; + def main(args: Array[String]): Unit = + System.out.println(b == null); +} + //############################################################################ // Main @@ -240,8 +271,11 @@ object Test { test(174, Bug174Test.main(args)); test(176, Bug176Test.main(args)); test(213, Bug213Test.main(args)); + test(217, Bug217Test.main(args)); + test(222, Bug222Test.main(args)); test(225, Bug225Test.main(args)); test(226, Bug226Test.main(args)); + test(233, Bug233Test.main(args)); if (errors > 0) { System.out.println(); -- cgit v1.2.3