File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -116,9 +116,9 @@ object Parsers {
116
116
/** Issue an error at given offset if beyond last error offset
117
117
* and update lastErrorOffset.
118
118
*/
119
- def syntaxError (msg : => Message , offset : Int = in.offset, name : Name = in.name ): Unit =
119
+ def syntaxError (msg : => Message , offset : Int = in.offset): Unit =
120
120
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
122
122
syntaxError(msg, Position (offset, offset + length))
123
123
lastErrorOffset = in.offset
124
124
}
@@ -777,7 +777,7 @@ object Parsers {
777
777
else infixType()
778
778
779
779
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) )
781
781
782
782
in.token match {
783
783
case ARROW => functionRest(t :: Nil )
You can’t perform that action at this time.
0 commit comments