summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2006-06-27 15:27:12 +0000
committerMartin Odersky <odersky@gmail.com>2006-06-27 15:27:12 +0000
commit972ecebb2794655b543fde5c8a4f75614729ce5c (patch)
tree185a9cdad776cd2bda468f79797ff362fa22e006 /test
parent5a17c91819ebeca83dcdfcfb1dc49e1bc7322a87 (diff)
downloadscala-972ecebb2794655b543fde5c8a4f75614729ce5c.tar.gz
scala-972ecebb2794655b543fde5c8a4f75614729ce5c.tar.bz2
scala-972ecebb2794655b543fde5c8a4f75614729ce5c.zip
Fixed bugs 633, 637, 639, 640
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/bug563.check7
-rw-r--r--test/files/neg/bug633.check4
-rw-r--r--test/files/neg/bug633.scala8
-rw-r--r--test/files/neg/bug639.check9
-rw-r--r--test/files/neg/bug639.scala3
-rw-r--r--test/files/pos/bug640.scala2
-rw-r--r--test/files/run/bigints.check5
-rwxr-xr-xtest/files/run/bigints.scala14
-rw-r--r--test/files/run/bug629.check1
-rw-r--r--test/files/run/bug629.scala13
10 files changed, 60 insertions, 6 deletions
diff --git a/test/files/neg/bug563.check b/test/files/neg/bug563.check
index 0f2eac240e..3c7423ea7d 100644
--- a/test/files/neg/bug563.check
+++ b/test/files/neg/bug563.check
@@ -1,9 +1,4 @@
bug563.scala:6 error: missing parameter type
map(n,ptr => new Cell(ptr.elem));
^
-bug563.scala:6 error: no type parameters for method map: (scala.List[A],(A) => R)scala.List[R] exist so that it can be applied to arguments (scala.List[scala.Cell[scala.Int]],(<error>) => <error>)
- --- because ---
-result type scala.List[R] is incompatible with expected type scala.Unit
- map(n,ptr => new Cell(ptr.elem));
- ^
-two errors found
+one error found
diff --git a/test/files/neg/bug633.check b/test/files/neg/bug633.check
new file mode 100644
index 0000000000..55f827ee69
--- /dev/null
+++ b/test/files/neg/bug633.check
@@ -0,0 +1,4 @@
+bug633.scala:3 error: not found: type ListBuffer
+ def t(a : ListBuffer[String]) = {
+ ^
+one error found
diff --git a/test/files/neg/bug633.scala b/test/files/neg/bug633.scala
new file mode 100644
index 0000000000..fd4e560720
--- /dev/null
+++ b/test/files/neg/bug633.scala
@@ -0,0 +1,8 @@
+object Test
+{
+ def t(a : ListBuffer[String]) = {
+ Console.println(a.length)
+ }
+
+ def main(argv : Array[String]) = t(null)
+}
diff --git a/test/files/neg/bug639.check b/test/files/neg/bug639.check
new file mode 100644
index 0000000000..7458952ce3
--- /dev/null
+++ b/test/files/neg/bug639.check
@@ -0,0 +1,9 @@
+/home/odersky/scala/test/files/pos/bug639.scala:1 error: not found: value a
+import a._
+ ^
+/home/odersky/scala/test/files/pos/bug639.scala:2 error: type mismatch;
+ found : B
+ required: scala.Attribute
+[B]
+ ^
+two errors found
diff --git a/test/files/neg/bug639.scala b/test/files/neg/bug639.scala
new file mode 100644
index 0000000000..7be0968069
--- /dev/null
+++ b/test/files/neg/bug639.scala
@@ -0,0 +1,3 @@
+import a._
+[B]
+class C
diff --git a/test/files/pos/bug640.scala b/test/files/pos/bug640.scala
new file mode 100644
index 0000000000..d46ecb7546
--- /dev/null
+++ b/test/files/pos/bug640.scala
@@ -0,0 +1,2 @@
+[serializable] class A
+[serializable] class B extends A
diff --git a/test/files/run/bigints.check b/test/files/run/bigints.check
new file mode 100644
index 0000000000..fb50db6447
--- /dev/null
+++ b/test/files/run/bigints.check
@@ -0,0 +1,5 @@
+3
+true
+false
+true
+true
diff --git a/test/files/run/bigints.scala b/test/files/run/bigints.scala
new file mode 100755
index 0000000000..f1328274c6
--- /dev/null
+++ b/test/files/run/bigints.scala
@@ -0,0 +1,14 @@
+object Test extends Application {
+ import BigInt._
+
+ val x: BigInt = 1
+ val y = x + 1
+ val z = 1 + y
+ System.out.println(z)
+ System.out.println(z <= 3)
+ System.out.println(3 < z)
+ System.out.println(z == 3)
+ System.out.println(3 == z)
+
+}
+
diff --git a/test/files/run/bug629.check b/test/files/run/bug629.check
new file mode 100644
index 0000000000..d86bac9de5
--- /dev/null
+++ b/test/files/run/bug629.check
@@ -0,0 +1 @@
+OK
diff --git a/test/files/run/bug629.scala b/test/files/run/bug629.scala
new file mode 100644
index 0000000000..67baead5f1
--- /dev/null
+++ b/test/files/run/bug629.scala
@@ -0,0 +1,13 @@
+object Test
+{
+ def main(args : Array[String]) : Unit = Console.println(new C(1))
+}
+
+abstract class A(val x : Int)
+
+class C(x : Int) extends A(x)
+{
+ override def toString() = "OK"
+ val v = new D
+ class D { def value = x }
+}