diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-09-16 17:15:09 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-09-22 14:53:19 +0200 |
commit | da3c5456d0d69ed20f1ba40cdb7b5efde9189d0b (patch) | |
tree | e4df00efeaa719719be8440caaf9beae8ad8377a /src | |
parent | 3cdbcf0c8610c564ea50ed6cf9e82d35c5750ce9 (diff) | |
download | scala-da3c5456d0d69ed20f1ba40cdb7b5efde9189d0b.tar.gz scala-da3c5456d0d69ed20f1ba40cdb7b5efde9189d0b.tar.bz2 scala-da3c5456d0d69ed20f1ba40cdb7b5efde9189d0b.zip |
minor cleanup for reflection
Diffstat (limited to 'src')
-rw-r--r-- | src/reflect/scala/reflect/internal/HasFlags.scala | 2 | ||||
-rw-r--r-- | src/reflect/scala/reflect/internal/Mirrors.scala | 4 | ||||
-rw-r--r-- | src/reflect/scala/reflect/internal/Symbols.scala | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/reflect/scala/reflect/internal/HasFlags.scala b/src/reflect/scala/reflect/internal/HasFlags.scala index 62c8ed702b..4a3663b8ea 100644 --- a/src/reflect/scala/reflect/internal/HasFlags.scala +++ b/src/reflect/scala/reflect/internal/HasFlags.scala @@ -99,6 +99,7 @@ trait HasFlags { def isLabel = hasAllFlags(LABEL | METHOD) && !hasAccessorFlag def isLazy = hasFlag(LAZY) def isLifted = hasFlag(LIFTED) + def isMacro = hasFlag(MACRO) def isMutable = hasFlag(MUTABLE) def isOverride = hasFlag(OVERRIDE) def isParamAccessor = hasFlag(PARAMACCESSOR) @@ -109,6 +110,7 @@ trait HasFlags { def isProtectedLocal = hasAllFlags(ProtectedLocal) def isPublic = hasNoFlags(PRIVATE | PROTECTED) && !hasAccessBoundary def isSealed = hasFlag(SEALED) + def isSpecialized = hasFlag(SPECIALIZED) def isSuperAccessor = hasFlag(SUPERACCESSOR) def isSynthetic = hasFlag(SYNTHETIC) def isTrait = hasFlag(TRAIT) && !hasFlag(PARAM) diff --git a/src/reflect/scala/reflect/internal/Mirrors.scala b/src/reflect/scala/reflect/internal/Mirrors.scala index bde7f7ac51..3635da130e 100644 --- a/src/reflect/scala/reflect/internal/Mirrors.scala +++ b/src/reflect/scala/reflect/internal/Mirrors.scala @@ -10,7 +10,7 @@ package internal import Flags._ trait Mirrors extends api.Mirrors { - self: SymbolTable => + thisUniverse: SymbolTable => override type Mirror >: Null <: RootsBase @@ -70,7 +70,7 @@ trait Mirrors extends api.Mirrors { protected def mirrorMissingHook(owner: Symbol, name: Name): Symbol = NoSymbol - protected def universeMissingHook(owner: Symbol, name: Name): Symbol = self.missingHook(owner, name) + protected def universeMissingHook(owner: Symbol, name: Name): Symbol = thisUniverse.missingHook(owner, name) private[scala] def missingHook(owner: Symbol, name: Name): Symbol = mirrorMissingHook(owner, name) orElse universeMissingHook(owner, name) diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala index a0e28bf735..e8c1d4ed12 100644 --- a/src/reflect/scala/reflect/internal/Symbols.scala +++ b/src/reflect/scala/reflect/internal/Symbols.scala @@ -67,7 +67,7 @@ trait Symbols extends api.Symbols { self: SymbolTable => def isParamWithDefault: Boolean = this.hasDefault def isByNameParam: Boolean = this.isValueParameter && (this hasFlag BYNAMEPARAM) def isImplementationArtifact: Boolean = (this hasFlag BRIDGE) || (this hasFlag VBRIDGE) || (this hasFlag ARTIFACT) - def isJava: Boolean = this hasFlag JAVA + def isJava: Boolean = isJavaDefined def isVal: Boolean = isTerm && !isModule && !isMethod && !isMutable def isVar: Boolean = isTerm && !isModule && !isMethod && isMutable @@ -489,14 +489,12 @@ trait Symbols extends api.Symbols { self: SymbolTable => def isAliasType = false def isAbstractType = false def isSkolem = false - def isMacro = this hasFlag MACRO /** A Type, but not a Class. */ def isNonClassType = false /** The bottom classes are Nothing and Null, found in Definitions. */ def isBottomClass = false - def isSpecialized = this hasFlag SPECIALIZED /** These are all tests for varieties of ClassSymbol, which has these subclasses: * - ModuleClassSymbol |