Skip to content

Commit 26da0c8

Browse files
committed
Narrow position of errors due to TypeError to limit hiding
1 parent 2040fb2 commit 26da0c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ object ErrorReporting {
1616
import tpd._
1717

1818
def errorTree(tree: untpd.Tree, msg: => Message)(implicit ctx: Context): tpd.Tree =
19-
tree withType errorType(msg, tree.pos)
19+
tree withType errorType(msg, tree.pos.focus)
2020

2121
def errorType(msg: => Message, pos: Position)(implicit ctx: Context): ErrorType = {
2222
ctx.error(msg, pos)

0 commit comments

Comments
 (0)