File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -518,16 +518,8 @@ object Parsers {
518
518
}
519
519
520
520
/** Accept identifier and return Ident with its name as a term name. */
521
- def termIdent (): Ident = {
522
- val start = in.offset
523
- val id = makeIdent(in.token, ident())
524
- if (id.name != nme.ERROR ) {
525
- atPos(start)(id)
526
- } else {
527
- // error identifiers don't consume any characters, so atPos(start)(id) wouldn't set a position.
528
- // Some testcases would then fail in Positioned.checkPos. Set a position anyway!
529
- atPos(start, start, in.lastOffset)(id)
530
- }
521
+ def termIdent (): Ident = atPos(in.offset) {
522
+ makeIdent(in.token, ident())
531
523
}
532
524
533
525
/** Accept identifier and return Ident with its name as a type name. */
You can’t perform that action at this time.
0 commit comments