We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c8545b commit ad04880Copy full SHA for ad04880
compiler/src/dotty/tools/dotc/parsing/Parsers.scala
@@ -518,16 +518,8 @@ object Parsers {
518
}
519
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
- }
+ def termIdent(): Ident = atPos(in.offset) {
+ makeIdent(in.token, ident())
531
532
533
/** Accept identifier and return Ident with its name as a type name. */
0 commit comments