summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2012-07-20 11:52:59 -0700
committerLukas Rytz <lukas.rytz@epfl.ch>2012-07-20 11:52:59 -0700
commitb67828d03908a3b94ca42404355b28f0f999eb89 (patch)
tree9349bcf56a28c3465e64cefc95bdaf88334296cd /src/library
parent46da0ee29f380ccb455c9c3c2adcf375e0c13ccf (diff)
parent124f316b0813116c6574f60737e5b63f06f4329e (diff)
downloadscala-b67828d03908a3b94ca42404355b28f0f999eb89.tar.gz
scala-b67828d03908a3b94ca42404355b28f0f999eb89.tar.bz2
scala-b67828d03908a3b94ca42404355b28f0f999eb89.zip
Merge pull request #894 from axel22/topic/static-annot-cherry-2.10.x
Implement @static annotation on singleton object fields.
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/annotation/static.scala20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/library/scala/annotation/static.scala b/src/library/scala/annotation/static.scala
new file mode 100644
index 0000000000..f2955c756c
--- /dev/null
+++ b/src/library/scala/annotation/static.scala
@@ -0,0 +1,20 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+package scala.annotation
+
+/**
+ * An annotation that marks a member in the companion object as static
+ * and ensures that the compiler generates static fields/methods for it.
+ * This is important for Java interoperability and performance reasons.
+ *
+ * @since 2.10
+ */
+final class static extends StaticAnnotation {
+ // TODO document exact semantics above!
+}