File tree 1 file changed +2
-6
lines changed
compiler/src/dotty/tools/dotc/parsing 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -1975,24 +1975,20 @@ object Parsers {
1975
1975
/** ImportSelector ::= id [`=>' id | `=>' `_']
1976
1976
*/
1977
1977
def importSelector (): Tree = {
1978
- val start = in.offset
1979
1978
val from = termIdentOrWildcard()
1980
1979
if (from.name != nme.WILDCARD && in.token == ARROW )
1981
1980
atPos(startOffset(from), in.skipToken()) {
1982
- val start2 = in.offset
1981
+ val start = in.offset
1983
1982
val to = termIdentOrWildcard()
1984
1983
val toWithPos =
1985
1984
if (to.name == nme.ERROR )
1986
1985
// error identifiers don't consume any characters, so atPos(start)(id) wouldn't set a position.
1987
1986
// Some testcases would then fail in Positioned.checkPos. Set a position anyway!
1988
- atPos(start2, start2 , in.lastOffset)(to)
1987
+ atPos(start, start , in.lastOffset)(to)
1989
1988
else
1990
1989
to
1991
1990
Thicket (from, toWithPos)
1992
1991
}
1993
- else if (from.name == nme.ERROR ) {
1994
- atPos(start, start, in.lastOffset)(from)
1995
- }
1996
1992
else from
1997
1993
}
1998
1994
You can’t perform that action at this time.
0 commit comments