diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2012-09-14 10:45:46 +0200 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2012-09-17 20:26:08 +0200 |
commit | 585069c0b65070d5fef0a58e455ad0ffe4390215 (patch) | |
tree | bed317852a187865d0dbfc0e7de648030b69bd45 /test | |
parent | 6b9e1a0747159128da1e84795c1be6698e16ee43 (diff) | |
download | scala-585069c0b65070d5fef0a58e455ad0ffe4390215.tar.gz scala-585069c0b65070d5fef0a58e455ad0ffe4390215.tar.bz2 scala-585069c0b65070d5fef0a58e455ad0ffe4390215.zip |
Revert "WIP add private/lazy checks and a few tests."
This reverts commit 227239018b38ab7218ee6b30493c9c8e1836c8c9.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/static-annot.check | 11 | ||||
-rw-r--r-- | test/files/neg/static-annot.scala | 14 | ||||
-rw-r--r-- | test/files/run/static-annot/field.scala | 38 |
3 files changed, 1 insertions, 62 deletions
diff --git a/test/files/neg/static-annot.check b/test/files/neg/static-annot.check index 66efebdcee..80aebcd406 100644 --- a/test/files/neg/static-annot.check +++ b/test/files/neg/static-annot.check @@ -4,16 +4,7 @@ static-annot.scala:8: error: Only members of top-level objects and their nested static-annot.scala:27: error: @static annotated field bar has the same name as a member of class Conflicting @static val bar = 1 ^ -static-annot.scala:37: error: The @static annotation is only allowed on public members. - @static private val bar = 1 - ^ -static-annot.scala:38: error: The @static annotation is only allowed on public members. - @static private val baz = 2 - ^ -static-annot.scala:39: error: The @static annotation is not allowed on lazy members. - @static lazy val bam = 3 - ^ static-annot.scala:14: error: Only members of top-level objects and their nested objects can be annotated with @static. @static val blah = 2 ^ -6 errors found
\ No newline at end of file +three errors found
\ No newline at end of file diff --git a/test/files/neg/static-annot.scala b/test/files/neg/static-annot.scala index c6c626d42b..b8c4651076 100644 --- a/test/files/neg/static-annot.scala +++ b/test/files/neg/static-annot.scala @@ -31,17 +31,3 @@ object Conflicting { class Conflicting { val bar = 45 } - - -object PrivateProtectedLazy { - @static private val bar = 1 - @static private val baz = 2 - @static lazy val bam = 3 -} - - -class PrivateProtectedLazy { - println(PrivateProtectedLazy.bar) - println(PrivateProtectedLazy.baz) - println(PrivateProtectedLazy.bam) -} diff --git a/test/files/run/static-annot/field.scala b/test/files/run/static-annot/field.scala index a7d8158321..0677082cf6 100644 --- a/test/files/run/static-annot/field.scala +++ b/test/files/run/static-annot/field.scala @@ -182,43 +182,6 @@ object Test7 extends Check { -/* TEST 8 */ - -object Foo8 { - @static val field = 7 - - val function: () => Int = () => { - field + 1 - } - - val anon = new Runnable { - def run() { - assert(field == 7, "runnable asserting field is 7") - } - } - - @static var mutable = 10 - - val mutation: () => Unit = () => { - mutable += 1 - } -} - -object Test8 { - def test() { - assert(Foo8.function() == 8, "function must return 8") - Foo8.anon.run() - assert(Foo8.mutable == 10, "mutable is 10") - Foo8.mutation() - assert(Foo8.mutable == 11, "mutable is 11") - Foo8.mutation() - assert(Foo8.mutable == 12, "mutable is 12") - } -} - - - - /* main */ object Test { @@ -231,7 +194,6 @@ object Test { Test5.test() Test6.test() Test7.test() - Test8.test() } } |