@@ -3525,7 +3525,8 @@ object Parsers {
3525
3525
em " `_` is no longer supported for a wildcard $exprName; use `*` instead ${rewriteNotice(`future-migration`)}" ,
3526
3526
in.sourcePos(),
3527
3527
from = future)
3528
- patch(source, Span (in.offset, in.offset + 1 ), " *" )
3528
+ if sourceVersion == `future-migration` then
3529
+ patch(source, Span (in.offset, in.offset + 1 ), " *" )
3529
3530
ImportSelector (atSpan(in.skipToken()) { Ident (nme.WILDCARD ) })
3530
3531
3531
3532
/** 'given [InfixType]' */
@@ -3544,9 +3545,10 @@ object Parsers {
3544
3545
em " The $exprName renaming `a => b` is no longer supported ; use `a as b` instead ${rewriteNotice(`future-migration`)}" ,
3545
3546
in.sourcePos(),
3546
3547
from = future)
3547
- patch(source, Span (in.offset, in.offset + 2 ),
3548
- if testChar(in.offset - 1 , ' ' ) && testChar(in.offset + 2 , ' ' ) then " as"
3549
- else " as " )
3548
+ if sourceVersion == `future-migration` then
3549
+ patch(source, Span (in.offset, in.offset + 2 ),
3550
+ if testChar(in.offset - 1 , ' ' ) && testChar(in.offset + 2 , ' ' ) then " as"
3551
+ else " as " )
3550
3552
atSpan(startOffset(from), in.skipToken()) {
3551
3553
val to = if in.token == USCORE then wildcardIdent() else termIdent()
3552
3554
ImportSelector (from, if to.name == nme.ERROR then EmptyTree else to)
0 commit comments