diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/bug563.check | 7 | ||||
-rw-r--r-- | test/files/neg/bug633.check | 4 | ||||
-rw-r--r-- | test/files/neg/bug633.scala | 8 | ||||
-rw-r--r-- | test/files/neg/bug639.check | 9 | ||||
-rw-r--r-- | test/files/neg/bug639.scala | 3 | ||||
-rw-r--r-- | test/files/pos/bug640.scala | 2 | ||||
-rw-r--r-- | test/files/run/bigints.check | 5 | ||||
-rwxr-xr-x | test/files/run/bigints.scala | 14 | ||||
-rw-r--r-- | test/files/run/bug629.check | 1 | ||||
-rw-r--r-- | test/files/run/bug629.scala | 13 |
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 } +} |