Skip to content

Commit 43b6fe6

Browse files
committed
Restore signature of syntaxError
1 parent b63b3c2 commit 43b6fe6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ object Parsers {
116116
/** Issue an error at given offset if beyond last error offset
117117
* and update lastErrorOffset.
118118
*/
119-
def syntaxError(msg: => Message, offset: Int = in.offset, name: Name = in.name): Unit =
119+
def syntaxError(msg: => Message, offset: Int = in.offset): Unit =
120120
if (offset > lastErrorOffset) {
121-
val length = if (name != null) name.show.length else 0
121+
val length = if (in.name != null) in.name.show.length else 0
122122
syntaxError(msg, Position(offset, offset + length))
123123
lastErrorOffset = in.offset
124124
}
@@ -777,7 +777,7 @@ object Parsers {
777777
else infixType()
778778

779779
if (isImplicit && !isImplicitFun && in.token != ARROW)
780-
syntaxError("Types with implicit keyword can only be function types", start, nme.IMPLICITkw)
780+
syntaxError("Types with implicit keyword can only be function types", Position(start, start + nme.IMPLICITkw.asSimpleName.length))
781781

782782
in.token match {
783783
case ARROW => functionRest(t :: Nil)

0 commit comments

Comments
 (0)