diff options
-rw-r--r-- | compiler/src/dotty/tools/dotc/parsing/Parsers.scala | 2 | ||||
-rw-r--r-- | tests/neg/i1845.scala | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala index 20a507213..f62093db0 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala @@ -540,7 +540,7 @@ object Parsers { def handleThis(qual: Ident) = { in.nextToken() val t = atPos(start) { This(qual) } - if (!thisOK && in.token != DOT) syntaxError(DanglingThisInPath(), start) + if (!thisOK && in.token != DOT) syntaxError(DanglingThisInPath(), t.pos) dotSelectors(t, finish) } def handleSuper(qual: Ident) = { diff --git a/tests/neg/i1845.scala b/tests/neg/i1845.scala index e3e5787e6..1ecffdc7d 100644 --- a/tests/neg/i1845.scala +++ b/tests/neg/i1845.scala @@ -1,3 +1,3 @@ object Test { type X = FooBar22.this // error -} // error +} |