summaryrefslogtreecommitdiff
path: root/test/files/run/bugs.scala
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-11-25 16:30:24 +0000
committerpaltherr <paltherr@epfl.ch>2003-11-25 16:30:24 +0000
commit9a387fe59fb6a4f42599f5b6b2da7d911f0da793 (patch)
treee2ed722609317df1f69db9134bcf542bb902ae58 /test/files/run/bugs.scala
parent3e30fefb9d0444a8f5e9cdde8cf5a16a6a1989c4 (diff)
downloadscala-9a387fe59fb6a4f42599f5b6b2da7d911f0da793.tar.gz
scala-9a387fe59fb6a4f42599f5b6b2da7d911f0da793.tar.bz2
scala-9a387fe59fb6a4f42599f5b6b2da7d911f0da793.zip
- Added bugs 217, 222 and 233
Diffstat (limited to 'test/files/run/bugs.scala')
-rw-r--r--test/files/run/bugs.scala34
1 files changed, 34 insertions, 0 deletions
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
@@ -178,6 +178,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
case class Bug225C();
@@ -209,6 +231,15 @@ object Bug226Test {
}
//############################################################################
+// Bug 233
+
+object Bug233Test {
+ val b: Array[String] = null;
+ def main(args: Array[String]): Unit =
+ System.out.println(b == null);
+}
+
+//############################################################################
// Main
object Test {
@@ -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();