File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -337,15 +337,15 @@ object Scanners {
337337
338338 /** A leading symbolic or backquoted identifier is treated as an infix operator if
339339 * - 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.
342342 * If a leading infix operator is found and the source version is `3.0-migration`, emit a change warning.
343343 */
344344 def isLeadingInfixOperator (inConditional : Boolean = true ) =
345345 allowLeadingInfixOperators
346346 && ( token == BACKQUOTED_IDENT
347347 || token == IDENTIFIER && isOperatorPart(name(name.length - 1 )))
348- && ch <= ' '
348+ && (isWhitespace(ch) || ch == LF )
349349 && ! pastBlankLine
350350 && {
351351 val lookahead = LookaheadScanner ()
You can’t perform that action at this time.
0 commit comments