Closed
Description
Typer crashes with a NullpointerException
when type checking the following example:
object test {
val foo = (()) => ()
}
For easier reference, here is part of the stacktrace:
Exception in thread "main" java.lang.NullPointerException
at dotty.tools.dotc.ast.tpd$.ref(tpd.scala:369)
at dotty.tools.dotc.ast.untpd$.ref(untpd.scala:353)
at dotty.tools.dotc.ast.desugar$.smallTuple(Desugar.scala:923)
at dotty.tools.dotc.typer.Typer.typedTuple(Typer.scala:1848)
at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1961)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1979)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2010)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2022)
at dotty.tools.dotc.typer.Namer.typedAheadType$$anonfun$1(Namer.scala:993)
at dotty.tools.dotc.typer.Namer.typedAheadImpl(Namer.scala:986)
at dotty.tools.dotc.typer.Namer.typedAheadType(Namer.scala:993)
at dotty.tools.dotc.typer.Namer.valOrDefDefSig(Namer.scala:1177)
at dotty.tools.dotc.typer.Namer$Completer.typeSig(Namer.scala:712)
at dotty.tools.dotc.typer.Namer$Completer.completeInCreationContext(Namer.scala:796)
at dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:741)
...