summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/static-annot.check22
-rw-r--r--test/files/neg/static-annot.scala53
-rw-r--r--test/files/neg/t4581.check0
-rw-r--r--test/files/neg/t4581/static-declaration_1.scala14
-rw-r--r--test/files/neg/t4581/static_2.java15
5 files changed, 0 insertions, 104 deletions
diff --git a/test/files/neg/static-annot.check b/test/files/neg/static-annot.check
deleted file mode 100644
index c98e7d9658..0000000000
--- a/test/files/neg/static-annot.check
+++ /dev/null
@@ -1,22 +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: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:52: error: The @static annotation is not allowed on method definitions.
- @static def x = 42
- ^
-static-annot.scala:14: error: Only members of top-level objects and their nested objects can be annotated with @static.
- @static val blah = 2
- ^
-7 errors found
diff --git a/test/files/neg/static-annot.scala b/test/files/neg/static-annot.scala
deleted file mode 100644
index c0b5ed30d8..0000000000
--- a/test/files/neg/static-annot.scala
+++ /dev/null
@@ -1,53 +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
-}
-
-
-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)
-}
-
-
-class StaticDef {
- // this should not crash the compiler
- @static def x = 42
-}
diff --git a/test/files/neg/t4581.check b/test/files/neg/t4581.check
deleted file mode 100644
index e69de29bb2..0000000000
--- a/test/files/neg/t4581.check
+++ /dev/null
diff --git a/test/files/neg/t4581/static-declaration_1.scala b/test/files/neg/t4581/static-declaration_1.scala
deleted file mode 100644
index f9a66b29c1..0000000000
--- a/test/files/neg/t4581/static-declaration_1.scala
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-object Constants {
- import scala.annotation.static
- @static val Const: Int = 0 // should generate a static final field
- @static final val FinalConst: Int = 0 // ditto
- @static var MutableField: Int = 0 // should not be final
-}
-
-
-
diff --git a/test/files/neg/t4581/static_2.java b/test/files/neg/t4581/static_2.java
deleted file mode 100644
index 2fd5bf1d82..0000000000
--- a/test/files/neg/t4581/static_2.java
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-public class static_2 {
- public static void main(String[] args) {
- Constants.Const = 17;
- Constants.FinalConst = 99;
- Constants.MutableField = 199;
- }
-}
-
-
-
-