File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -1144,13 +1144,12 @@ object Parsers {
1144
1144
val name = bindingName()
1145
1145
val t =
1146
1146
if (in.token == COLON && location == Location .InBlock ) {
1147
- if (false ) // Don't error yet, as the alternative syntax "implicit (x: T) => ... "
1148
- // is not supported by Scala2.x
1147
+ if (ctx.settings.strict.value)
1148
+ // Don't error in non-strict mode, as the alternative syntax "implicit (x: T) => ... "
1149
+ // is not supported by Scala2.x
1149
1150
migrationWarningOrError(s " This syntax is no longer supported; parameter needs to be enclosed in (...) " )
1150
-
1151
1151
in.nextToken()
1152
1152
val t = infixType()
1153
-
1154
1153
if (false && in.isScala2Mode) {
1155
1154
patch(source, Position (start), " (" )
1156
1155
patch(source, Position (in.lastOffset), " )" )
You can’t perform that action at this time.
0 commit comments