summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2006-12-14 09:56:37 +0000
committermichelou <michelou@epfl.ch>2006-12-14 09:56:37 +0000
commite74806422b5ccf2b4b37f6299e7b0e14c0f9bdf3 (patch)
tree27678342574552f6ceb321684ae2c280c3368527
parentd26f9ec82227e1cf844b745d89cdf655e9f24c74 (diff)
downloadscala-e74806422b5ccf2b4b37f6299e7b0e14c0f9bdf3.tar.gz
scala-e74806422b5ccf2b4b37f6299e7b0e14c0f9bdf3.tar.bz2
scala-e74806422b5ccf2b4b37f6299e7b0e14c0f9bdf3.zip
added test in neg/scopes.scala
-rw-r--r--test/files/neg/scopes.check17
-rw-r--r--test/files/neg/scopes.scala14
2 files changed, 19 insertions, 12 deletions
diff --git a/test/files/neg/scopes.check b/test/files/neg/scopes.check
index 152c820317..b6712c1a8c 100644
--- a/test/files/neg/scopes.check
+++ b/test/files/neg/scopes.check
@@ -8,15 +8,18 @@ scopes.scala:5 error: x is already defined as value x
val x: float = .0f
^
scopes.scala:8 error: y is already defined as value y
- val y: float = .0f
- ^
+ val y: float = .0f
+ ^
scopes.scala:11 error: x is already defined as value x
- def params(x: int, x: float) = x
- ^
+ def f1(x: int, x: float) = x
+ ^
scopes.scala:12 error: y is already defined as value y
- def curried(x: int)(y: int, y: float) = x + y
- ^
+ def f2(x: int)(y: int, y: float) = x + y
+ ^
scopes.scala:13 error: x is already defined as value x
(x: int, x: float) => x
^
-7 errors found
+scopes.scala:15 error: x is already defined as value x
+ case x::x => x
+ ^
+8 errors found
diff --git a/test/files/neg/scopes.scala b/test/files/neg/scopes.scala
index 0083101b00..f5e60b72b6 100644
--- a/test/files/neg/scopes.scala
+++ b/test/files/neg/scopes.scala
@@ -4,11 +4,15 @@ object test1 {
val x: int = 0
val x: float = .0f
{
- val y: int = 0
- val y: float = .0f
- ()
+ val y: int = 0
+ val y: float = .0f
+ ()
}
- def params(x: int, x: float) = x
- def curried(x: int)(y: int, y: float) = x + y
+ def f1(x: int, x: float) = x
+ def f2(x: int)(y: int, y: float) = x + y
(x: int, x: float) => x
+ List() match {
+ case x::x => x
+ case Nil => Nil
+ }
}