aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2016-03-07 17:49:23 +0100
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2016-03-07 17:52:50 +0100
commitc73fbaa3fa082788fb3057ab7d8bce4b0f4b426b (patch)
treed8158ea1824c4ce20a2336cb7667fcd526265e1c /src/dotty/tools/backend/jvm/DottyBackendInterface.scala
parenta50926701ef5171779aa025d2d307751d166cabe (diff)
downloaddotty-c73fbaa3fa082788fb3057ab7d8bce4b0f4b426b.tar.gz
dotty-c73fbaa3fa082788fb3057ab7d8bce4b0f4b426b.tar.bz2
dotty-c73fbaa3fa082788fb3057ab7d8bce4b0f4b426b.zip
Implement @static sip.
This pull request implements most of machinery needed for https://github.com/scala/scala.github.com/pull/491 Only 3-rd check is not implemented by this commit. I propose to get this in faster to fix #1149
Diffstat (limited to 'src/dotty/tools/backend/jvm/DottyBackendInterface.scala')
-rw-r--r--src/dotty/tools/backend/jvm/DottyBackendInterface.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
index 5776cc8e2..ef8e4997f 100644
--- a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
+++ b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
@@ -601,7 +601,8 @@ class DottyBackendInterface(outputDirectory: AbstractFile)(implicit ctx: Context
isPrivate //|| (sym.isPrimaryConstructor && sym.owner.isTopLevelModuleClass)
def isFinal: Boolean = sym is Flags.Final
- def isStaticMember: Boolean = (sym ne NoSymbol) && ((sym is Flags.JavaStatic) || (owner is Flags.ImplClass))
+ def isStaticMember: Boolean = (sym ne NoSymbol) &&
+ ((sym is Flags.JavaStatic) || (owner is Flags.ImplClass) || toDenot(sym).hasAnnotation(ctx.definitions.ScalaStaticAnnot))
// guard against no sumbol cause this code is executed to select which call type(static\dynamic) to use to call array.clone
def isBottomClass: Boolean = (sym ne defn.NullClass) && (sym ne defn.NothingClass)