summaryrefslogtreecommitdiff
path: root/test/files/neg/checksensible.scala
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2007-03-30 11:59:49 +0000
committermichelou <michelou@epfl.ch>2007-03-30 11:59:49 +0000
commit208678a0c1273d5746184b5980ec9674130fa63c (patch)
tree6a8ae7ac5132d107ac8d00226f594fcf62c9dd14 /test/files/neg/checksensible.scala
parentb739c4a2eccfe4c8846e5e523ede121f81886a65 (diff)
downloadscala-208678a0c1273d5746184b5980ec9674130fa63c.tar.gz
scala-208678a0c1273d5746184b5980ec9674130fa63c.tar.bz2
scala-208678a0c1273d5746184b5980ec9674130fa63c.zip
removed Console, added 2 tests
Diffstat (limited to 'test/files/neg/checksensible.scala')
-rw-r--r--test/files/neg/checksensible.scala20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/files/neg/checksensible.scala b/test/files/neg/checksensible.scala
index 7d0514396d..3a9fca2a08 100644
--- a/test/files/neg/checksensible.scala
+++ b/test/files/neg/checksensible.scala
@@ -1,4 +1,3 @@
-import java.io._
class Test {
var c = 0
println((c = 1) > 0)
@@ -12,20 +11,18 @@ class Test {
println(new Object == new Object)
println(new Array(1) != new Array(1))
- val foo: Array[String] = Array("1","2","3");
- if( foo.length == null ) // == 0 makes more sense, but still
- Console.println("plante"); // this code leads to runtime crash
+ val foo: Array[String] = Array("1","2","3")
+ if (foo.length == null) // == 0 makes more sense, but still
+ println("plante") // this code leads to runtime crash
else
- Console.println("plante pas");
+ println("plante pas")
def main(args: Array[String]) = {
- val in = new FileInputStream(args(0))
+ val in = new java.io.FileInputStream(args(0))
var c = 0
-
- while((c = in.read) != -1) {
- Console.print(c.toChar)
- }
+ while ((c = in.read) != -1)
+ print(c.toChar)
in.close
}
@@ -37,4 +34,7 @@ class Test {
def isabstract: int
+ println(1 != println)
+ println(1 != 'sym)
+
}