Closed
Description
Minimized code
// E-68737bd09b469bddc6c978e79bc741721ae24085
trait I0[-I1] {
def [@specialized(List[I2], i3
val
def i3(i4: Int }
Output (click arrow to expand)
-- [E040] Syntax Error: test.scala:3:0 -----------------------------------------
3 |val
|^^^
|')' expected, but 'val' found
-- [E040] Syntax Error: test.scala:4:0 -----------------------------------------
4 |def i3(i4: Int }
|^^^
|';' expected, but 'def' found
-- [E040] Syntax Error: test.scala:4:15 ----------------------------------------
4 |def i3(i4: Int }
| ^
| ')' expected, but '}' found
exception occurred while typechecking test.scala
exception occurred while compiling test.scala
java.lang.Error: internal error: closing over non-method <overloaded I0.this.$anonfun>, pos = <46..46> while compiling test.scala
Exception in thread "main" java.lang.Error: internal error: closing over non-method <overloaded I0.this.$anonfun>, pos = <46..46>
at dotty.tools.dotc.typer.Typer.typedClosure(Typer.scala:1233)
at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2387)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2436)
at dotty.tools.dotc.typer.Typer.op$1(Typer.scala:2502)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2511)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2514)
at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2625)
at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:858)
at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2384)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2436)
at dotty.tools.dotc.typer.Typer.op$1(Typer.scala:2502)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2511)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2514)
at dotty.tools.dotc.typer.Typer.typedFunctionValue(Typer.scala:1189)
at dotty.tools.dotc.typer.Typer.typedFunction(Typer.scala:971)
at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2386)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2436)
at dotty.tools.dotc.typer.Typer.op$1(Typer.scala:2502)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2511)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2514)
at dotty.tools.dotc.typer.Typer.adaptNoArgsUnappliedMethod$2(Typer.scala:3130)