summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2006-01-24 15:14:33 +0000
committermichelou <michelou@epfl.ch>2006-01-24 15:14:33 +0000
commit049fd9e20d3c611e031fcafbf96b363a52bc90d0 (patch)
tree32d0b533dd078d345cf05582f065cd7d1077271b /src/compiler
parent91cb19d56861c80c2968e3ede2fef7ccab5f38ec (diff)
downloadscala-049fd9e20d3c611e031fcafbf96b363a52bc90d0.tar.gz
scala-049fd9e20d3c611e031fcafbf96b363a52bc90d0.tar.bz2
scala-049fd9e20d3c611e031fcafbf96b363a52bc90d0.zip
fixed bug in isWhitespace argument in file scal...
fixed bug in isWhitespace argument in file scala/tools/nsc/symtab/Symbols.scala
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Symbols.scala12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Symbols.scala b/src/compiler/scala/tools/nsc/symtab/Symbols.scala
index 538b481a52..fd82115954 100644
--- a/src/compiler/scala/tools/nsc/symtab/Symbols.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Symbols.scala
@@ -1,8 +1,9 @@
/* NSC -- new scala compiler
- * Copyright 2005 LAMP/EPFL
+ * Copyright 2005-2006 LAMP/EPFL
* @author Martin Odersky
*/
// $Id$
+
package scala.tools.nsc.symtab;
import scala.tools.util.AbstractFile;
@@ -19,7 +20,6 @@ mixin class Symbols requires SymbolTable {
var typeSymbolCount = 0;
var classSymbolCount = 0;
-
type AttrInfo = Pair[Type, List[Constant]];
val emptySymbolArray = new Array[Symbol](0);
@@ -38,7 +38,7 @@ mixin class Symbols requires SymbolTable {
def pos = rawpos;
def setPos(pos: int): this.type = { this.rawpos = pos; this }
- def namePos(source : SourceFile) = {
+ def namePos(source: SourceFile) = {
val buf = source.content;
if (pos == Position.NOPOS) Position.NOPOS;
else if (isTypeParameter) pos - name.length;
@@ -49,7 +49,7 @@ mixin class Symbols requires SymbolTable {
else if (isModule) ret = ret + ("object").length();
else ret = ret + ("var").length();
while (Character.isWhitespace(buf(ret))) ret = ret + 1;
- ret;
+ ret
}
else if (isValue) {
if (pos < (buf.length + ("val ").length())) {
@@ -58,7 +58,8 @@ mixin class Symbols requires SymbolTable {
(buf(pos + 2) == 'l') &&
(buf(pos + 3) == ' ')) {
var pos0 = pos + 4;
- while (pos0 < buf.length && Character.isWhitespace(pos0)) pos0 = pos0 + 1;
+ while (pos0 < buf.length && Character.isWhitespace(buf(pos0)))
+ pos0 = pos0 + 1;
pos0;
} else pos;
@@ -1071,4 +1072,5 @@ mixin class Symbols requires SymbolTable {
assert(start != 0);
override def toString() = "TypeHistory(" + phaseWithId(start) + "," + info + "," + prev + ")";
}
+
}