Skip to content

Commit 1841b3d

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 026e7ce commit 1841b3d

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
@@ -1181,7 +1181,8 @@ object Parsers {
11811181
t
11821182
}
11831183

1184-
def ascription(t: Tree, location: Location.Value) = atPos(startOffset(t), in.skipToken()) {
1184+
def ascription(t: Tree, location: Location.Value) = atPos(startOffset(t)) {
1185+
in.skipToken()
11851186
in.token match {
11861187
case USCORE =>
11871188
val uscoreStart = in.skipToken()

0 commit comments

Comments
 (0)