Skip to content

Commit 752347c

Browse files
committed
Don't try to eagerly parse inline
1 parent 819d193 commit 752347c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3253,14 +3253,14 @@ object Parsers {
32533253
val firstParamMod =
32543254
var mods = EmptyModifiers
32553255
if isErased then mods = addModifier(mods)
3256-
if in.name == nme.inline then mods = addModifier(mods)
3256+
// if in.name == nme.inline then mods = addModifier(mods)
32573257
mods
32583258
if givenOnly && !impliedMods.is(Given) then
32593259
syntaxError(em"`using` expected")
32603260
val isParams =
32613261
!impliedMods.is(Given)
32623262
|| startParamTokens.contains(in.token)
3263-
|| isIdent && in.lookahead.isColon
3263+
|| isIdent && (in.name == nme.inline || in.lookahead.isColon)
32643264
(if isParams then commaSeparated(() => param())
32653265
else contextTypes(ofClass, nparams, impliedMods)) match {
32663266
case Nil => Nil

0 commit comments

Comments
 (0)