summaryrefslogtreecommitdiff
path: root/src/attic
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-11-02 16:49:45 +0000
committerPaul Phillips <paulp@improving.org>2010-11-02 16:49:45 +0000
commit8e320487627e85cce44a4eab0d77d28fd0904d50 (patch)
tree4ec432f0c3566e5b4d70aebe1bc9266cf006efd0 /src/attic
parent543d70e30c153522eedb986755ae3a5de8d820c6 (diff)
downloadscala-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/attic')
-rw-r--r--src/attic/scala/tools/nsc/models/Models.scala2
-rw-r--r--src/attic/scala/tools/nsc/models/SemanticTokens.scala8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/attic/scala/tools/nsc/models/Models.scala b/src/attic/scala/tools/nsc/models/Models.scala
index 7365709b25..e30b8bac02 100644
--- a/src/attic/scala/tools/nsc/models/Models.scala
+++ b/src/attic/scala/tools/nsc/models/Models.scala
@@ -84,7 +84,7 @@ abstract class Models {
}
} else {
val ddef = tree.asInstanceOf[ValOrDefDef];
- if (ddef.mods.hasFlag(symtab.Flags.MUTABLE)) VAR;
+ if (ddef.mods.isMutable) VAR;
else VAL;
}
}
diff --git a/src/attic/scala/tools/nsc/models/SemanticTokens.scala b/src/attic/scala/tools/nsc/models/SemanticTokens.scala
index ab75bbbcfc..badbcecd77 100644
--- a/src/attic/scala/tools/nsc/models/SemanticTokens.scala
+++ b/src/attic/scala/tools/nsc/models/SemanticTokens.scala
@@ -234,7 +234,7 @@ class SemanticTokens(val compiler: Global) {
build(tree.impl.parents)
build(tree.impl.body)
case tree: ValOrDefDef =>
- if (!tree.symbol.hasFlag(Flags.ACCESSOR) || tree.symbol.hasFlag(DEFERRED)) {
+ if (!tree.symbol.hasAccessorFlag || tree.symbol.isDeferred) {
// MO: I added !tree.symbol.hasFlag(DEFERRED) in a refactoring where
// getters now can be abstract whereas before they could not.
// Adding the condition thus keeps the old behavior.
@@ -244,9 +244,9 @@ class SemanticTokens(val compiler: Global) {
eatKeywords(unit.source.asInstanceOf[BatchSourceFile], tree.pos.point);
if (false) Console.err.println("VALDEF: tree=" + tree + " sym=" + tree.symbol + " pos0=" +
tree.symbol.pos + " alias=" + tree.symbol.alias + " pos1=" +
- pos + " pos2=" + tree.pos.dbgString + " " + tree.symbol.hasFlag(Flags.SYNTHETIC));
+ pos + " pos2=" + tree.pos.dbgString + " " + tree.symbol.isSynthetic);
- if (pos != -1 && !tree.hasFlag(Flags.SYNTHETIC))
+ if (pos != -1 && !tree.isSynthetic)
buildDef(tree.symbol, pos);
}
@@ -496,7 +496,7 @@ class SemanticTokens(val compiler: Global) {
def buildDef(term: Symbol, pos: Int) = buildSym(term, pos, true, null)
def buildSym(term: Symbol, pos: Int, isDef: Boolean, tpe: Type): Unit =
- if (term.hasFlag(Flags.ACCESSOR))
+ if (term.hasAccessorFlag)
buildSym(analyzer.underlying(term), pos, isDef, tpe)
else if (pos == -1) {
//Console.err.println("NOPOS: " + term)