summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorburaq <buraq@epfl.ch>2004-08-19 17:29:40 +0000
committerburaq <buraq@epfl.ch>2004-08-19 17:29:40 +0000
commit801009bb557c613823384fb6531d36c48a95ba19 (patch)
tree309fbf7ace49ca7330caae7f6c682819fbf5d017 /sources
parentd2bb97849985f367f5e5101222d20c7f5a06d61c (diff)
downloadscala-801009bb557c613823384fb6531d36c48a95ba19.tar.gz
scala-801009bb557c613823384fb6531d36c48a95ba19.tar.bz2
scala-801009bb557c613823384fb6531d36c48a95ba19.zip
fixed typo that led to incorrect line numbers
Diffstat (limited to 'sources')
-rw-r--r--sources/scala/io/Position.scala12
1 files changed, 10 insertions, 2 deletions
diff --git a/sources/scala/io/Position.scala b/sources/scala/io/Position.scala
index 4fb57b9dc7..84f2dca624 100644
--- a/sources/scala/io/Position.scala
+++ b/sources/scala/io/Position.scala
@@ -58,8 +58,16 @@ object Position {
if( column < 0 )
error(line+","+column+" not allowed");
- if (line >= LINE_MASK) { line1 = LINE_MASK; column1 = 0; }
- if (column > COLUMN_MASK) column1 = COLUMN_MASK;
+ if (line >= LINE_MASK) {
+ line1 = LINE_MASK;
+ column1 = 0; }
+ else {
+ line1 = line;
+ if (column > COLUMN_MASK)
+ column1 = COLUMN_MASK;
+ else
+ column1 = column
+ }
(line1 << COLUMN_BITS) | column1;
}