Skip to content

Commit fe22b3b

Browse files
committed
Point out import in error message
1 parent ac4dbf0 commit fe22b3b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,9 @@ object Parsers {
11981198
report.errorOrMigrationWarning(
11991199
em"""symbol literal '${in.name} is no longer supported,
12001200
|use a string literal "${in.name}" or an application Symbol("${in.name}") instead,
1201-
|or enclose in braces '{${in.name}} if you want a quoted expression.""",
1201+
|or enclose in braces '{${in.name}} if you want a quoted expression.
1202+
|For now, you can also `import language.deprecated.symbolLiterals` to accept
1203+
|the idiom, but this possibility might no longer be available in the future.""",
12021204
in.sourcePos())
12031205
if migrateTo3 then
12041206
patch(source, Span(in.offset, in.offset + 1), "Symbol(\"")

0 commit comments

Comments
 (0)