Skip to content

Commit 664783b

Browse files
committed
Properly add erased flags for generated parameters in the parser
1 parent 1040923 commit 664783b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1587,11 +1587,14 @@ object Parsers {
15871587
else infixType()
15881588

15891589
in.token match
1590-
case ARROW | CTXARROW => functionRest(t :: Nil)
1590+
case ARROW | CTXARROW =>
1591+
erasedArgs.addOne(false)
1592+
functionRest(t :: Nil)
15911593
case MATCH => matchType(t)
15921594
case FORSOME => syntaxError(ExistentialTypesNoLongerSupported()); t
15931595
case _ =>
15941596
if isPureArrow then
1597+
erasedArgs.addOne(false)
15951598
functionRest(t :: Nil)
15961599
else
15971600
if (erasedArgs.exists(_ == true) && !t.isInstanceOf[FunctionWithMods])

0 commit comments

Comments
 (0)