File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -1904,10 +1904,7 @@ object Parsers {
19041904
19051905 def expr (location : Location ): Tree = {
19061906 val start = in.offset
1907- def isSpecialClosureStart =
1908- val lookahead = in.LookaheadScanner ()
1909- lookahead.nextToken()
1910- lookahead.isIdent(nme.using) || lookahead.token == ERASED
1907+ def isSpecialClosureStart = in.lookahead.token == ERASED
19111908 if in.token == IMPLICIT then
19121909 closure(start, location, modifiers(BitSet (IMPLICIT )))
19131910 else if in.token == LPAREN && isSpecialClosureStart then
@@ -2137,9 +2134,7 @@ object Parsers {
21372134 else
21382135 openParens.change(LPAREN , 1 )
21392136 var mods1 = mods
2140- if mods.flags.isEmpty then
2141- if isIdent(nme.using) then mods1 = addMod(mods1, atSpan(in.skipToken()) { Mod .Given () })
2142- if in.token == ERASED then mods1 = addModifier(mods1)
2137+ if in.token == ERASED then mods1 = addModifier(mods1)
21432138 try
21442139 commaSeparated(() => binding(mods1))
21452140 finally
Original file line number Diff line number Diff line change 1+ val test =
2+ (using x : Int ) => x // error // error
You can’t perform that action at this time.
0 commit comments