Skip to content

AssertionError due to recursive inheritance from a case class extending AnyVal. #5005

Closed
@sir-wabbit

Description

@sir-wabbit
case class i0 (i0: i1) extends AnyVal
trait i1 extends i0
no sig for TypeRef(ThisType(TypeRef(NoPrefix,module class <empty>)),class i0) because of ()
failure while taking result signature of (i0: i1): i0: i0
cannot take signature of (i0: i1): i0

Exception in thread "main" java.lang.AssertionError: assertion failed
	at dotty.DottyPredef$.assertFail(DottyPredef.scala:37)
	at dotty.tools.dotc.core.TypeErasure$ErasedValueType$.apply(TypeErasure.scala:89)
	at dotty.tools.dotc.core.TypeErasure.eraseDerivedValueClassRef(TypeErasure.scala:475)
	at dotty.tools.dotc.core.TypeErasure.dotty$tools$dotc$core$TypeErasure$$sigName(TypeErasure.scala:527)
	at dotty.tools.dotc.core.TypeErasure$.sigName(TypeErasure.scala:138)
	at dotty.tools.dotc.core.Signature$.apply(Signature.scala:128)
	at dotty.tools.dotc.core.Types$MethodicType.resultSignature(Types.scala:2660)
	at dotty.tools.dotc.core.Types$MethodType.computeSignature(Types.scala:2951)
	at dotty.tools.dotc.core.Types$SignatureCachingType.signature(Types.scala:2648)
	at dotty.tools.dotc.core.Types$MethodOrPoly.signature(Types.scala:2799)
	at dotty.tools.dotc.core.Denotations$SingleDenotation.signature(Denotations.scala:696)
	at dotty.tools.dotc.core.Denotations$SingleDenotation.matches(Denotations.scala:1078)
	at dotty.tools.dotc.core.Denotations$SingleDenotation.filterDisjoint(Denotations.scala:1086)
	at dotty.tools.dotc.core.Denotations$SingleDenotation.mapInherited(Denotations.scala:1090)
	at dotty.tools.dotc.core.Denotations$SingleDenotation.mapInherited(Denotations.scala:1087)
	at dotty.tools.dotc.core.SymDenotations$ClassDenotation.collect$1(SymDenotations.scala:1594)
	at dotty.tools.dotc.core.SymDenotations$ClassDenotation.collect$1(SymDenotations.scala:1594)
	at dotty.tools.dotc.core.SymDenotations$ClassDenotation.computeNPMembersNamed(SymDenotations.scala:1594)

AE-6ab2b244fffa7fe885bf03d6e195c8740dd8748f

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions