diff options
author | Paul Phillips <paulp@improving.org> | 2010-10-02 23:19:16 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-10-02 23:19:16 +0000 |
commit | 943fbb1363345fdaca55e5df95059e8ce8c1344b (patch) | |
tree | b12582afc26fe0e3d0dc4a502eef5e6a2d41bfb3 /test/files/neg/scopes.scala | |
parent | 06aa1c9eff49d5190e82a72a876d7b3bd706d6d4 (diff) | |
download | scala-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.scala')
-rw-r--r-- | test/files/neg/scopes.scala | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/files/neg/scopes.scala b/test/files/neg/scopes.scala new file mode 100644 index 0000000000..fd31ff5f72 --- /dev/null +++ b/test/files/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 + } +} |