Skip to content

Commit 24ef49b

Browse files
committed
Fix off by 2 error for symbol positions
1 parent 08e3f76 commit 24ef49b

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/dotty/tools/dotc/util/Positions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ object Positions {
158158
}
159159
def toPosition = {
160160
assert(isPosition)
161-
if (this == NoCoord) NoPosition else Position(1 - encoding)
161+
if (this == NoCoord) NoPosition else Position(-1 - encoding)
162162
}
163163
}
164164

tests/neg/t0654.scala

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)