summaryrefslogtreecommitdiff
path: root/test/files/neg/static-annot.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/static-annot.scala')
-rw-r--r--test/files/neg/static-annot.scala47
1 files changed, 47 insertions, 0 deletions
diff --git a/test/files/neg/static-annot.scala b/test/files/neg/static-annot.scala
new file mode 100644
index 0000000000..c6c626d42b
--- /dev/null
+++ b/test/files/neg/static-annot.scala
@@ -0,0 +1,47 @@
+
+
+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)
+}