summaryrefslogtreecommitdiff
path: root/test/files/run/bugs.scala
diff options
context:
space:
mode:
authorschinz <schinz@epfl.ch>2003-12-10 15:26:03 +0000
committerschinz <schinz@epfl.ch>2003-12-10 15:26:03 +0000
commit904d31853dda3e962c503f48113b2f96c9305f13 (patch)
treec319b55702794cee209d945374713753284b507b /test/files/run/bugs.scala
parent44e74c63819b375099a0033f6146049dc4fd1646 (diff)
downloadscala-904d31853dda3e962c503f48113b2f96c9305f13.tar.gz
scala-904d31853dda3e962c503f48113b2f96c9305f13.tar.bz2
scala-904d31853dda3e962c503f48113b2f96c9305f13.zip
- added bugs 98, 120 and 250
Diffstat (limited to 'test/files/run/bugs.scala')
-rw-r--r--test/files/run/bugs.scala46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/files/run/bugs.scala b/test/files/run/bugs.scala
index ebaaa1342b..153c1e2f90 100644
--- a/test/files/run/bugs.scala
+++ b/test/files/run/bugs.scala
@@ -6,6 +6,39 @@
import java.lang.System; // to avoid name clash with .NET's library
//############################################################################
+// Bug 98
+
+object Bug98Test {
+ object MyCase { def name = "mycase" };
+ def main(args: Array[String]) = {
+ System.out.println(MyCase.name);
+ }
+}
+
+//############################################################################
+// Bug 120
+
+class Bug120A(x: Int) {
+ System.out.println("A");
+}
+class Bug120B(x: Int) {
+ System.out.println("B");
+}
+class Bug120C(x: Int)
+ with Bug120A(Bug120Test.print("one", 1))
+ with Bug120B(Bug120Test.print("two", 2)) {
+ System.out.println("C");
+}
+object Bug120Test {
+ def print[A](str: String, res: A): A = {
+ System.out.println(str); res
+ }
+ def main(args: Array[String]) = {
+ val c = new Bug120C(1);
+ }
+}
+
+//############################################################################
// Bug 135
object Bug135Test {
@@ -252,6 +285,16 @@ object Bug233Test {
}
//############################################################################
+// Bug 250
+
+object Bug250Test {
+ def main(args: Array[String]): Unit = {
+ if (true) null;
+ ()
+ }
+}
+
+//############################################################################
// Main
object Test {
@@ -275,6 +318,8 @@ object Test {
def main(args: Array[String]): Unit = {
+ test( 98, Bug98Test.main(args));
+ test(120, Bug120Test.main(args));
test(135, Bug135Test.main(args));
test(142, Bug142Test.main(args));
test(166, Bug166Test.main(args));
@@ -289,6 +334,7 @@ object Test {
test(225, Bug225Test.main(args));
test(226, Bug226Test.main(args));
test(233, Bug233Test.main(args));
+ test(250, Bug250Test.main(args));
if (errors > 0) {
System.out.println();