diff options
author | Paul Phillips <paulp@improving.org> | 2010-11-02 16:49:45 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-11-02 16:49:45 +0000 |
commit | 8e320487627e85cce44a4eab0d77d28fd0904d50 (patch) | |
tree | 4ec432f0c3566e5b4d70aebe1bc9266cf006efd0 /src/library | |
parent | 543d70e30c153522eedb986755ae3a5de8d820c6 (diff) | |
download | scala-8e320487627e85cce44a4eab0d77d28fd0904d50.tar.gz scala-8e320487627e85cce44a4eab0d77d28fd0904d50.tar.bz2 scala-8e320487627e85cce44a4eab0d77d28fd0904d50.zip |
One of those annoying patches for which I apolo...
One of those annoying patches for which I apologize in advance. It's a
step toward a better world. Almost all the changes herein are simple
transformations of "x hasFlag FOO" to "x.isFoo", with the remainder
minor cleanups. It's too big to review, so let's say no review:
but I'm still all ears for input on the issues mostly outlined in
HasFlags.scala.
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/reflect/generic/HasFlags.scala | 8 | ||||
-rwxr-xr-x | src/library/scala/reflect/generic/Symbols.scala | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/library/scala/reflect/generic/HasFlags.scala b/src/library/scala/reflect/generic/HasFlags.scala index 9ce91ce197..2f635fbd79 100644 --- a/src/library/scala/reflect/generic/HasFlags.scala +++ b/src/library/scala/reflect/generic/HasFlags.scala @@ -26,7 +26,7 @@ package generic final def isModuleVar: Boolean = isVariable && hasFlag(MODULEVAR) final def isStable = isTerm && - !hasFlag(MUTABLE) && + !hasTraitFlag && (!hasFlag(METHOD | BYNAMEPARAM) || hasFlag(STABLE)) && !(tpe.isVolatile && !hasAnnotation(uncheckedStableClass)) final def isStatic: Boolean = @@ -178,8 +178,10 @@ trait HasFlags { def isDefaultInit = hasFlag(DEFAULTINIT) // Disambiguating: DEFAULTPARAM, TRAIT - def hasDefault = hasAllFlags(DEFAULTPARAM | PARAM) - def isTrait = hasFlag(TRAIT) && !hasFlag(PARAM) + def hasDefault = hasAllFlags(DEFAULTPARAM | PARAM) + def isTrait = hasFlag(TRAIT) && !hasFlag(PARAM) + def hasTraitFlag = hasFlag(TRAIT) + def hasDefaultFlag = hasFlag(DEFAULTPARAM) // Straightforwardly named accessors already being used differently. // These names are most likely temporary. diff --git a/src/library/scala/reflect/generic/Symbols.scala b/src/library/scala/reflect/generic/Symbols.scala index 25454698f8..0362e497e5 100755 --- a/src/library/scala/reflect/generic/Symbols.scala +++ b/src/library/scala/reflect/generic/Symbols.scala @@ -135,7 +135,6 @@ trait Symbols { self: Universe => final def isCovariant = isType && hasFlag(COVARIANT) final def isEarlyInitialized: Boolean = isTerm && hasFlag(PRESUPER) final def isExistentiallyBound = isType && hasFlag(EXISTENTIAL) - final def isGetterOrSetter = hasFlag(ACCESSOR) final def isImplClass = isClass && hasFlag(IMPLCLASS) // Is this symbol an implementation class for a mixin? final def isLazyAccessor = isLazy && lazyAccessor != NoSymbol final def isMethod = isTerm && hasFlag(METHOD) |