File tree 1 file changed +3
-3
lines changed
compiler/src/dotty/tools/dotc/parsing
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -337,15 +337,15 @@ object Scanners {
337
337
338
338
/** A leading symbolic or backquoted identifier is treated as an infix operator if
339
339
* - it does not follow a blank line, and
340
- * - it is followed on the same line by at least one ' '
341
- * and a token that can start an expression.
340
+ * - it is followed by at least one whitespace character and a
341
+ * token that can start an expression.
342
342
* If a leading infix operator is found and the source version is `3.0-migration`, emit a change warning.
343
343
*/
344
344
def isLeadingInfixOperator (inConditional : Boolean = true ) =
345
345
allowLeadingInfixOperators
346
346
&& ( token == BACKQUOTED_IDENT
347
347
|| token == IDENTIFIER && isOperatorPart(name(name.length - 1 )))
348
- && ch <= ' '
348
+ && (isWhitespace(ch) || ch == LF )
349
349
&& ! pastBlankLine
350
350
&& {
351
351
val lookahead = LookaheadScanner ()
You can’t perform that action at this time.
0 commit comments