diff options
author | Sean McDirmid <sean.mcdirmid@gmail.com> | 2007-04-19 05:16:02 +0000 |
---|---|---|
committer | Sean McDirmid <sean.mcdirmid@gmail.com> | 2007-04-19 05:16:02 +0000 |
commit | 2ef5d4c6d81e5008fdb2ae1b4f2ecdd9d9901fd2 (patch) | |
tree | 1d1b222bd6a0caa29c0a02e465842bdf30cfae52 /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | |
parent | e43c7bef06d64b98f00752bd06510768ba37910a (diff) | |
download | scala-2ef5d4c6d81e5008fdb2ae1b4f2ecdd9d9901fd2.tar.gz scala-2ef5d4c6d81e5008fdb2ae1b4f2ecdd9d9901fd2.tar.bz2 scala-2ef5d4c6d81e5008fdb2ae1b4f2ecdd9d9901fd2.zip |
Switching over to position objects from positio...
Switching over to position objects from position type parameters.
Positions are no longer ints.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index cfb4c3e270..3d8c664ae6 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -9,7 +9,7 @@ package scala.tools.nsc.typechecker import symtab.Flags._ import collection.mutable.HashMap import transform.InfoTransform - +import scala.tools.nsc.util.{Position, NoPosition} import compat.Math.MIN_INT /** <p> @@ -422,7 +422,7 @@ abstract class RefChecks extends InfoTransform { class LevelInfo(val outer: LevelInfo) { val scope: Scope = if (outer eq null) newScope else newScope(outer.scope) var maxindex: int = MIN_INT - var refpos: int = _ + var refpos: Position = _ var refsym: Symbol = _ } @@ -451,7 +451,7 @@ abstract class RefChecks extends InfoTransform { } } - private def enterReference(pos: int, sym: Symbol): unit = + private def enterReference(pos: Position, sym: Symbol): unit = if (sym.isLocal) { val e = currentLevel.scope.lookupEntry(sym.name) if ((e ne null) && sym == e.sym) { @@ -471,7 +471,7 @@ abstract class RefChecks extends InfoTransform { def apply(tp: Type) = mapOver(tp).normalize } - def checkSensible(pos: int, fn: Tree, args: List[Tree]) = fn match { + def checkSensible(pos: Position, fn: Tree, args: List[Tree]) = fn match { case Select(qual, name) if (args.length == 1) => def isNew(tree: Tree) = tree match { case Function(_, _) @@ -519,7 +519,7 @@ abstract class RefChecks extends InfoTransform { // Transformation ------------------------------------------------------------ /* Convert a reference to a case factory of type `tpe' to a new of the class it produces. */ - def toConstructor(pos: PositionType, tpe: Type): Tree = { + def toConstructor(pos: Position, tpe: Type): Tree = { var rtpe = tpe.finalResultType assert(rtpe.symbol hasFlag CASE, tpe); localTyper.typedOperator { |