File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -659,7 +659,15 @@ object Parsers {
659659 }
660660 val isNegated = negOffset < in.offset
661661 atPos(negOffset) {
662- if (in.token == SYMBOLLIT ) atPos(in.skipToken()) { SymbolLit (in.strVal) }
662+ if (in.token == SYMBOLLIT ) {
663+ migrationWarningOrError(em """ symbol literal ' ${in.name} is no longer supported,
664+ |use a string literal " ${in.name}" or an application Symbol(" ${in.name}") instead. """ )
665+ if (in.isScala2Mode) {
666+ patch(source, Position (in.offset, in.offset + 1 ), " Symbol(\" " )
667+ patch(source, Position (in.charOffset - 1 ), " \" )" )
668+ }
669+ atPos(in.skipToken()) { SymbolLit (in.strVal) }
670+ }
663671 else if (in.token == INTERPOLATIONID ) interpolatedString(inPattern)
664672 else finish(in.token match {
665673 case CHARLIT => in.charVal
You can’t perform that action at this time.
0 commit comments