Skip to content

Whitespace-sensitive AssertionError somewhere in the typer (parser stability) #5004

Closed
@sir-wabbit

Description

@sir-wabbit
// The bug is whitespace sensitive!!!
object i0 {
1 match {
def this(): Int
  def this()
}
}
Exception in thread "main" java.lang.AssertionError: assertion failed
	at dotty.DottyPredef$.assertFail(DottyPredef.scala:37)
	at dotty.tools.dotc.core.Types$MethodType.<init>(Types.scala:2941)
	at dotty.tools.dotc.core.Types$CachedMethodType.<init>(Types.scala:2958)
	at dotty.tools.dotc.core.Types$MethodTypeCompanion.apply(Types.scala:3026)
	at dotty.tools.dotc.core.Types$MethodTypeCompanion.fromSymbols(Types.scala:3022)
	at dotty.tools.dotc.typer.NamerContextOps.$anonfun$1(Namer.scala:144)
	at scala.collection.immutable.List.$anonfun$foldRight$1(List.scala:405)
	at scala.collection.immutable.List.foldRight(List.scala:86)
	at scala.collection.TraversableOnce.$colon$bslash(TraversableOnce.scala:153)
	at scala.collection.TraversableOnce.$colon$bslash$(TraversableOnce.scala:153)
	at scala.collection.AbstractTraversable.$colon$bslash(Traversable.scala:104)
	at dotty.tools.dotc.typer.NamerContextOps.methodType(Namer.scala:144)
	at dotty.tools.dotc.typer.Namer.wrapMethType$1(Namer.scala:1196)
	at dotty.tools.dotc.typer.Namer.defDefSig(Namer.scala:1210)
	at dotty.tools.dotc.typer.Namer$Completer.typeSig(Namer.scala:721)
	at dotty.tools.dotc.typer.Namer$Completer.completeInCreationContext(Namer.scala:801)
	at dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:746)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:237)
	at dotty.tools.dotc.core.Denotations$Denotation.completeInfo$1(Denotations.scala:184)
	at dotty.tools.dotc.core.Denotations$Denotation.info(Denotations.scala:186)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.ensureCompleted(SymDenotations.scala:343)
	at dotty.tools.dotc.typer.Typer.retrieveSym(Typer.scala:1771)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1796)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1868)

AE-4f7e66f7ee706c59e8d8ba100db9d2bf0152b119

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions