Skip to content

Commit bfdf732

Browse files
committed
Fix position of Bind nodes
The position of a tree should contain the position of all its children, but that was not the case before this commit for Bind nodes created from Typed nodes.
1 parent 49e18fd commit bfdf732

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
484484
if (id.name == nme.WILDCARD || id.name == nme.WILDCARD_STAR) ifPat
485485
else {
486486
import untpd._
487-
typed(Bind(id.name, Typed(Ident(wildName), tree.tpt)).withPos(id.pos), pt)
487+
typed(Bind(id.name, Typed(Ident(wildName), tree.tpt)).withPos(tree.pos), pt)
488488
}
489489
case _ => ifExpr
490490
}

0 commit comments

Comments
 (0)