File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -2015,24 +2015,20 @@ object Parsers {
2015
2015
/** ImportSelector ::= id [`=>' id | `=>' `_']
2016
2016
*/
2017
2017
def importSelector (): Tree = {
2018
- val start = in.offset
2019
2018
val from = termIdentOrWildcard()
2020
2019
if (from.name != nme.WILDCARD && in.token == ARROW )
2021
2020
atPos(startOffset(from), in.skipToken()) {
2022
- val start2 = in.offset
2021
+ val start = in.offset
2023
2022
val to = termIdentOrWildcard()
2024
2023
val toWithPos =
2025
2024
if (to.name == nme.ERROR )
2026
2025
// error identifiers don't consume any characters, so atPos(start)(id) wouldn't set a position.
2027
2026
// Some testcases would then fail in Positioned.checkPos. Set a position anyway!
2028
- atPos(start2, start2 , in.lastOffset)(to)
2027
+ atPos(start, start , in.lastOffset)(to)
2029
2028
else
2030
2029
to
2031
2030
Thicket (from, toWithPos)
2032
2031
}
2033
- else if (from.name == nme.ERROR ) {
2034
- atPos(start, start, in.lastOffset)(from)
2035
- }
2036
2032
else from
2037
2033
}
2038
2034
You can’t perform that action at this time.
0 commit comments