diff options
author | michelou <michelou@epfl.ch> | 2007-01-08 12:01:19 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2007-01-08 12:01:19 +0000 |
commit | 210fdccbfb6d7d367360300abc2fa9aaa1cb6acc (patch) | |
tree | 117dd5faefa931bdcd39a6eab03a76520fb6a493 /test/files | |
parent | 7931d3dbaf84016b7a1e5030775888d65a42f5b2 (diff) | |
download | scala-210fdccbfb6d7d367360300abc2fa9aaa1cb6acc.tar.gz scala-210fdccbfb6d7d367360300abc2fa9aaa1cb6acc.tar.bz2 scala-210fdccbfb6d7d367360300abc2fa9aaa1cb6acc.zip |
added test case in neg/scopes.scala
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/scopes.check | 17 | ||||
-rw-r--r-- | test/files/neg/scopes.scala | 2 |
2 files changed, 12 insertions, 7 deletions
diff --git a/test/files/neg/scopes.check b/test/files/neg/scopes.check index 891267ddd4..09b1bcbdb6 100644 --- a/test/files/neg/scopes.check +++ b/test/files/neg/scopes.check @@ -4,22 +4,25 @@ case class test0(x: int, x: float) scopes.scala:2: error: x is already defined as value x ^ -scopes.scala:5: error: x is already defined as value x +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:8: error: y is already defined as value y +scopes.scala:10: error: y is already defined as value y val y: float = .0f ^ -scopes.scala:11: error: x is already defined as value x +scopes.scala:13: error: x is already defined as value x def f1(x: int, x: float) = x ^ -scopes.scala:12: error: y is already defined as value y +scopes.scala:14: error: y is already defined as value y def f2(x: int)(y: int, y: float) = x + y ^ -scopes.scala:13: error: x is already defined as value x +scopes.scala:15: error: x is already defined as value x (x: int, x: float) => x ^ -scopes.scala:15: error: x is already defined as value x +scopes.scala:17: error: x is already defined as value x case x::x => x ^ -8 errors found +9 errors found diff --git a/test/files/neg/scopes.scala b/test/files/neg/scopes.scala index f5e60b72b6..b69714ca19 100644 --- a/test/files/neg/scopes.scala +++ b/test/files/neg/scopes.scala @@ -1,6 +1,8 @@ case class test0(x: int, x: float) object test1 { + type t = int + type t = float val x: int = 0 val x: float = .0f { |