File tree Expand file tree Collapse file tree 4 files changed +14
-3
lines changed
compiler/src/dotty/tools/dotc/parsing
neg-custom-args/fatal-warnings Expand file tree Collapse file tree 4 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -2169,11 +2169,11 @@ object Parsers {
21692169 // Don't error in non-strict mode, as the alternative syntax "implicit (x: T) => ... "
21702170 // is not supported by Scala2.x
21712171 report.errorOrMigrationWarning(
2172- s " This syntax is no longer supported; parameter needs to be enclosed in (...) " ,
2173- in.sourcePos( ))
2172+ s " This syntax is no longer supported; parameter needs to be enclosed in (...) ${rewriteNotice()} " ,
2173+ source.atSpan( Span (start, in.lastOffset) ))
21742174 in.nextToken()
21752175 val t = infixType()
2176- if (false && migrateTo3 ) {
2176+ if (sourceVersion == `3.1-migration` ) {
21772177 patch(source, Span (start), " (" )
21782178 patch(source, Span (in.lastOffset), " )" )
21792179 }
Original file line number Diff line number Diff line change 1+ -- Error: tests/neg-custom-args/fatal-warnings/i9266.scala:3:22 --------------------------------------------------------
2+ 3 |def test = { implicit x: Int => x + x } // error
3+ | ^
4+ | This syntax is no longer supported; parameter needs to be enclosed in (...)
5+ | This construct can be rewritten automatically under -rewrite.
Original file line number Diff line number Diff line change 1+ import language .`3.1-migration`
2+
3+ def test = { implicit x : Int => x + x } // error
Original file line number Diff line number Diff line change 1+ import language .`3.1-migration`
2+
3+ def test = { implicit x : Int => x + x }
You can’t perform that action at this time.
0 commit comments