summaryrefslogtreecommitdiff
path: root/test/pending/neg
diff options
context:
space:
mode:
authorGeoffrey Washburn <geoffrey.washburn@epfl.ch>2008-08-05 09:55:58 +0000
committerGeoffrey Washburn <geoffrey.washburn@epfl.ch>2008-08-05 09:55:58 +0000
commit6d5656f6374cc558efad6c8c2c651d070738af8c (patch)
tree7db48772ea505e69450d5707d693015283a7914c /test/pending/neg
parent6e159702e1e2b12e30ca014441591b7be03e8f19 (diff)
downloadscala-6d5656f6374cc558efad6c8c2c651d070738af8c.tar.gz
scala-6d5656f6374cc558efad6c8c2c651d070738af8c.tar.bz2
scala-6d5656f6374cc558efad6c8c2c651d070738af8c.zip
Moving currently problematic tests to pending.
Diffstat (limited to 'test/pending/neg')
-rw-r--r--test/pending/neg/scopes.check30
-rw-r--r--test/pending/neg/scopes.scala20
2 files changed, 50 insertions, 0 deletions
diff --git a/test/pending/neg/scopes.check b/test/pending/neg/scopes.check
new file mode 100644
index 0000000000..bb8e15058b
--- /dev/null
+++ b/test/pending/neg/scopes.check
@@ -0,0 +1,30 @@
+scopes.scala:1: error: x is already defined as value x
+case class test0(x: int, x: float)
+ ^
+scopes.scala:5: error: t is already defined as type t
+ type t = float
+ ^
+scopes.scala:7: error: x is already defined as value x
+ val x: float = .0f;
+ ^
+scopes.scala:10: error: y is already defined as value y
+ val y: float = .0f
+ ^
+scopes.scala:13: error: x is already defined as value x
+ def f1(x: int, x: float) = x
+ ^
+scopes.scala:14: error: y is already defined as value y
+ def f2(x: int)(y: int, y: float) = x + y
+ ^
+scopes.scala:15: error: x is already defined as value x
+ val closure = (x: int, x: float) => x
+ ^
+scopes.scala:17: error: x is already defined as value x
+ case x::x => x
+ ^
+scopes.scala:1: error: type mismatch;
+ found : float
+ required: int
+case class test0(x: int, x: float)
+ ^
+9 errors found
diff --git a/test/pending/neg/scopes.scala b/test/pending/neg/scopes.scala
new file mode 100644
index 0000000000..e38a0a3d2e
--- /dev/null
+++ b/test/pending/neg/scopes.scala
@@ -0,0 +1,20 @@
+case class test0(x: int, x: float)
+
+object test1 {
+ type t = int
+ type t = float
+ val x: int = 0
+ val x: float = .0f;
+ {
+ val y: int = 0
+ val y: float = .0f
+ ()
+ }
+ def f1(x: int, x: float) = x
+ def f2(x: int)(y: int, y: float) = x + y
+ val closure = (x: int, x: float) => x
+ List() match {
+ case x::x => x
+ case Nil => Nil
+ }
+}