diff options
-rw-r--r-- | build.xml | 23 | ||||
-rw-r--r-- | src/compiler/scala/reflect/makro/runtime/Symbols.scala | 2 | ||||
-rw-r--r-- | src/library/scala/reflect/makro/Symbols.scala | 7 |
3 files changed, 30 insertions, 2 deletions
@@ -274,7 +274,26 @@ INITIALISATION <property name="version.suffix" value="-${version.bnum}"/> </target> - <target name="init.build.suffix.done" depends="init.build.release, init.build.patch.release"/> + <target name="init.hasmavensuffix" if="build.release" depends="init.build.patch.release, init.build.release"> + <condition property="version.hasmavensuffix"> + <not><equals arg1="${maven.version.suffix}" arg2=""/></not> + </condition> + </target> + + <target name="init.osgi.suffix" if="version.hasmavensuffix" depends="init.hasmavensuffix"> + <property name="osgi.version.suffix" value="${maven.version.suffix}"/> + </target> + + <target name="init.osgi.suffix.final" if="build.release" unless="version.hasmavensuffix" depends="init.hasmavensuffix"> + <property name="osgi.version.suffix" value="-VFINAL"/> + </target> + + + <target name="init.osgi.suffix.snapshot" unless="build.release" depends="init.hasmavensuffix"> + <property name="osgi.version.suffix" value=""/> + </target> + + <target name="init.build.suffix.done" depends="init.build.release, init.build.patch.release, init.osgi.suffix, init.osgi.suffix.final, init.osgi.suffix.snapshot"/> <target name="init.version.git" depends="init.build.suffix.done"> <!-- Find out whether we are running on Windows --> @@ -296,7 +315,7 @@ INITIALISATION value="${version.major}.${version.minor}.${version.patch}${version.suffix}${maven.version.suffix}"/> <property name="osgi.version.number" - value="${version.major}.${version.minor}.${version.patch}.v${git.commit.date}${version.suffix}-${git.commit.sha}"/> + value="${version.major}.${version.minor}.${version.patch}.v${git.commit.date}${version.suffix}${osgi.version.suffix}-${git.commit.sha}"/> </target> <target name="init.version.snapshot" unless="build.release" depends="init.version.git"> diff --git a/src/compiler/scala/reflect/makro/runtime/Symbols.scala b/src/compiler/scala/reflect/makro/runtime/Symbols.scala index 552ad2a303..6341523486 100644 --- a/src/compiler/scala/reflect/makro/runtime/Symbols.scala +++ b/src/compiler/scala/reflect/makro/runtime/Symbols.scala @@ -5,4 +5,6 @@ trait Symbols { self: Context => def isLocatable(sym: Symbol) = sym.isLocatable + + def isStatic(sym: Symbol) = sym.isStatic }
\ No newline at end of file diff --git a/src/library/scala/reflect/makro/Symbols.scala b/src/library/scala/reflect/makro/Symbols.scala index 91a5f6d8a5..ca1c17534c 100644 --- a/src/library/scala/reflect/makro/Symbols.scala +++ b/src/library/scala/reflect/makro/Symbols.scala @@ -14,4 +14,11 @@ trait Symbols { * With `isLocatable' it's possible to check whether a tree can be retained as is, or it needs special treatment. */ def isLocatable(sym: Symbol): Boolean + + /** Is this symbol static (i.e. with no outer instance)? + * Q: When exactly is a sym marked as STATIC? + * A: If it's a member of a toplevel object, or of an object contained in a toplevel object, or any number of levels deep. + * http://groups.google.com/group/scala-internals/browse_thread/thread/d385bcd60b08faf6 + */ + def isStatic(sym: Symbol): Boolean }
\ No newline at end of file |