From 4bfcadabae7663e4329f5a4b21a9368477a7e3e3 Mon Sep 17 00:00:00 2001 From: Grzegorz Kossakowski Date: Mon, 17 Sep 2012 20:25:31 +0200 Subject: Revert "Implement @static annotation on singleton object fields." This reverts commit 892ee3df93a10ffe24fb11b37ad7c3a9cb93d5de with exception of keeping `@static` annotation in the library so we can deploy a new starr that does not depend on it before removing it completely. Conflicts: src/compiler/scala/tools/nsc/backend/icode/GenICode.scala src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala src/compiler/scala/tools/nsc/transform/CleanUp.scala --- test/files/neg/static-annot.check | 10 ---------- test/files/neg/static-annot.scala | 33 --------------------------------- 2 files changed, 43 deletions(-) delete mode 100644 test/files/neg/static-annot.check delete mode 100644 test/files/neg/static-annot.scala (limited to 'test/files/neg') diff --git a/test/files/neg/static-annot.check b/test/files/neg/static-annot.check deleted file mode 100644 index 80aebcd406..0000000000 --- a/test/files/neg/static-annot.check +++ /dev/null @@ -1,10 +0,0 @@ -static-annot.scala:8: error: Only members of top-level objects and their nested objects can be annotated with @static. - @static val bar = 1 - ^ -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:14: error: Only members of top-level objects and their nested objects can be annotated with @static. - @static val blah = 2 - ^ -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 deleted file mode 100644 index b8c4651076..0000000000 --- a/test/files/neg/static-annot.scala +++ /dev/null @@ -1,33 +0,0 @@ - - -import annotation.static - - - -class StaticInClass { - @static val bar = 1 -} - - -class NestedObjectInClass { - object Nested { - @static val blah = 2 - } -} - - -object NestedObjectInObject { - object Nested { - @static val succeed = 3 - } -} - - -object Conflicting { - @static val bar = 1 -} - - -class Conflicting { - val bar = 45 -} -- cgit v1.2.3