Skip to content

Commit d71c58d

Browse files
committed
Fix the .pos.point of Bind nodes
The point of a definition should be the position of the first letter in the name of a definition. For a `Bind` node this is just the start (previously we were using the position of the `:`).
1 parent 9d513b6 commit d71c58d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,8 @@ object Parsers {
11551155
t
11561156
}
11571157

1158-
def ascription(t: Tree, location: Location.Value) = atPos(startOffset(t), in.skipToken()) {
1158+
def ascription(t: Tree, location: Location.Value) = atPos(startOffset(t)) {
1159+
in.skipToken()
11591160
in.token match {
11601161
case USCORE =>
11611162
val uscoreStart = in.skipToken()

0 commit comments

Comments
 (0)