diff options
author | Paul Phillips <paulp@improving.org> | 2010-10-13 04:48:20 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-10-13 04:48:20 +0000 |
commit | d64cbe436646bccb42def34641c399e8367b1e44 (patch) | |
tree | 45f8210f412b733dce3540329ad7d29a7f343081 /src/compiler/scala/tools/nsc/typechecker | |
parent | 08c460450aaa1c3e3e6eb6b2b12309f1476bf6df (diff) | |
download | scala-d64cbe436646bccb42def34641c399e8367b1e44.tar.gz scala-d64cbe436646bccb42def34641c399e8367b1e44.tar.bz2 scala-d64cbe436646bccb42def34641c399e8367b1e44.zip |
The second piece of the flags patch.
into Modifiers and Symbol, but touches as little as possible beyond
that. It also includes some lengthy commentary (see HasFlags.scala) on
the state of the flags and some of the remaining issues. One more patch
which unfortunately but unavoidably touches almost every file in the
compiler lies ahead.
The floor is still open! But no review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Namers.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Unapplies.scala | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index a666dee60b..7b2b737fb5 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -397,7 +397,7 @@ trait Namers { self: Analyzer => // .isInstanceOf[..]: probably for (old) IDE hook. is this obsolete? val getter = enterAccessorMethod(tree, name, getterFlags(mods1.flags), mods1) setInfo(getter)(namerOf(getter).getterTypeCompleter(vd)) - if (mods1.isVariable) { + if (mods1.isMutable) { val setter = enterAccessorMethod(tree, nme.getterToSetter(name), setterFlags(mods1.flags), mods1) setInfo(setter)(namerOf(setter).setterTypeCompleter(vd)) } diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 472df80df5..c494185133 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1748,7 +1748,7 @@ trait Typers { self: Analyzer => // for `val` and `var` parameter, look at `target` meta-annotation if (phase.id <= currentRun.typerPhase.id && meth.isPrimaryConstructor) { for (vparams <- ddef.vparamss; vd <- vparams) { - if (vd hasFlag PARAMACCESSOR) { + if (vd.mods.isParamAccessor) { val sym = vd.symbol sym.setAnnotations(memberAnnots(sym.annotations, ParamTargetClass, keepClean = true)) } diff --git a/src/compiler/scala/tools/nsc/typechecker/Unapplies.scala b/src/compiler/scala/tools/nsc/typechecker/Unapplies.scala index 57540fffef..409cc30291 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Unapplies.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Unapplies.scala @@ -136,7 +136,7 @@ trait Unapplies extends ast.TreeDSL // > MaxFunctionArity is caught in Namers, but for nice error reporting instead of // an abrupt crash we trim the list here. def primaries = constrParamss(cdef).head take MaxFunctionArity map (_.tpt) - def inheritFromFun = !cdef.mods.isAbstract && cdef.tparams.isEmpty && constrParamss(cdef).length == 1 + def inheritFromFun = !(cdef.mods hasFlag ABSTRACT) && cdef.tparams.isEmpty && constrParamss(cdef).length == 1 def createFun = gen.scalaFunctionConstr(primaries, toIdent(cdef), abstractFun = true) def parents = if (inheritFromFun) List(createFun) else Nil def toString = DefDef( |