summaryrefslogtreecommitdiff
path: root/test/files/neg/scopes.check
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-10-02 23:19:16 +0000
committerPaul Phillips <paulp@improving.org>2010-10-02 23:19:16 +0000
commit943fbb1363345fdaca55e5df95059e8ce8c1344b (patch)
treeb12582afc26fe0e3d0dc4a502eef5e6a2d41bfb3 /test/files/neg/scopes.check
parent06aa1c9eff49d5190e82a72a876d7b3bd706d6d4 (diff)
downloadscala-943fbb1363345fdaca55e5df95059e8ce8c1344b.tar.gz
scala-943fbb1363345fdaca55e5df95059e8ce8c1344b.tar.bz2
scala-943fbb1363345fdaca55e5df95059e8ce8c1344b.zip
The next batch of tests put up a little more st...
The next batch of tests put up a little more struggle, but only a little. See test/pending/pos/unappgadteval.scala (the changes for which were in the previous commit) for an example of a test which might be on to something. Any idea what it would take to get it working? // the key lines case i @ Suc() => { (y: Int) => y + 1 } // a = Int => Int case f @ Lam[b,c](x, e) => { (y: b) => eval(e, env.extend(x, y)) } // a = b=>c No review.
Diffstat (limited to 'test/files/neg/scopes.check')
-rw-r--r--test/files/neg/scopes.check35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/files/neg/scopes.check b/test/files/neg/scopes.check
new file mode 100644
index 0000000000..54c5d5b5e1
--- /dev/null
+++ b/test/files/neg/scopes.check
@@ -0,0 +1,35 @@
+scopes.scala:1: error: x is already defined as value x
+case class test0(x: Int, x: Float)
+ ^
+scopes.scala:1: error: type mismatch;
+ found : Float
+ required: Int
+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)
+ ^
+10 errors found