File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -3412,7 +3412,7 @@ object Parsers {
34123412 else
34133413 (EmptyTermName , isIdent(nme.extension))
34143414
3415- val gdef = indentRegion(name) {
3415+ val gdef = indentRegion(if name.isEmpty then GIVEN else name) {
34163416 if isExtension then
34173417 if (in.token == COLON ) in.nextToken()
34183418 assert(ident() == nme.extension)
Original file line number Diff line number Diff line change @@ -345,7 +345,7 @@ object Scanners {
345345
346346 lookahead.token match {
347347 case IDENTIFIER | BACKQUOTED_IDENT => handle(lookahead.name)
348- case IF | WHILE | FOR | MATCH | TRY | NEW => handle(lookahead.token)
348+ case IF | WHILE | FOR | MATCH | TRY | NEW | GIVEN => handle(lookahead.token)
349349 case _ =>
350350 }
351351 }
Original file line number Diff line number Diff line change 1+ given Conversion [Int , String ] with
2+ def apply (x : Int ) = " "
3+ end given
You can’t perform that action at this time.
0 commit comments