File tree Expand file tree Collapse file tree 4 files changed +13
-3
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -960,8 +960,9 @@ object Scanners {
960960 '|' | '\\ ' =>
961961 putChar(ch); nextChar(); getOperatorRest()
962962 case '/' =>
963- if (skipComment()) finishNamed()
964- else { putChar('/' ); getOperatorRest() }
963+ val nxch = lookaheadChar()
964+ if nxch == '/' || nxch == '*' then finishNamed()
965+ else { putChar(ch); nextChar(); getOperatorRest() }
965966 case _ =>
966967 if (isSpecial(ch)) { putChar(ch); nextChar(); getOperatorRest() }
967968 else finishNamed()
Original file line number Diff line number Diff line change 1+ -- [E006] Not Found Error: tests/neg/i10268.scala:2:16 -----------------------------------------------------------------
2+ 2 | def test[T] = ?//test // error
3+ | ^
4+ | Not found: ?
5+
6+ longer explanation available when compiling with `-explain`
Original file line number Diff line number Diff line change 1+ object Main {
2+ def test [T ] = ?// test // error
3+ }
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ val x = 1
55val b1 = {
66 22
77 * 22 // ok
8- */* one more*/ 22 // error: end of statement expected
8+ */* one more*/ 22 // error: end of statement expected // error: not found: *
99} // error: ';' expected, but '}' found
1010
1111val b2 : Boolean = {
You can’t perform that action at this time.
0 commit comments