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 {
1904
1904
1905
1905
def expr (location : Location ): Tree = {
1906
1906
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
1911
1908
if in.token == IMPLICIT then
1912
1909
closure(start, location, modifiers(BitSet (IMPLICIT )))
1913
1910
else if in.token == LPAREN && isSpecialClosureStart then
@@ -2137,9 +2134,7 @@ object Parsers {
2137
2134
else
2138
2135
openParens.change(LPAREN , 1 )
2139
2136
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)
2143
2138
try
2144
2139
commaSeparated(() => binding(mods1))
2145
2140
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