Skip to content

ListBuffer, Seq and IndexedSeq cannot be compiled together #916

@DarkDimius

Description

@DarkDimius

dotc ./scala-scala/src/library/scala/collection/mutable/ListBuffer.scala -Ycheck:all ./scala-scala/src/library/scala/collection/immutable/Seq.scala ./scala-scala/src/library/scala/collection/mutable/IndexedSeq.scala

checking ./scala-scala/src/library/scala/collection/mutable/ListBuffer.scala after phase frontend
checking ./scala-scala/src/library/scala/collection/immutable/Seq.scala after phase frontend
checking ./scala-scala/src/library/scala/collection/mutable/IndexedSeq.scala after phase frontend
checking ./scala-scala/src/library/scala/collection/mutable/ListBuffer.scala after phase posttyper
checking ./scala-scala/src/library/scala/collection/immutable/Seq.scala after phase posttyper
checking ./scala-scala/src/library/scala/collection/mutable/IndexedSeq.scala after phase posttyper
checking ./scala-scala/src/library/scala/collection/mutable/ListBuffer.scala after phase pickler
checking ./scala-scala/src/library/scala/collection/immutable/Seq.scala after phase pickler
checking ./scala-scala/src/library/scala/collection/mutable/IndexedSeq.scala after phase pickler
checking ./scala-scala/src/library/scala/collection/mutable/ListBuffer.scala after phase TreeTransform:{firstTransform, checkReentrant}
checking ./scala-scala/src/library/scala/collection/immutable/Seq.scala after phase TreeTransform:{firstTransform, checkReentrant}
checking ./scala-scala/src/library/scala/collection/mutable/IndexedSeq.scala after phase TreeTransform:{firstTransform, checkReentrant}
warning: encountered F-bounded higher-kinded type parameters for type scala$collection$generic$GenMapFactory$$CC; assuming they are invariant
warning: encountered F-bounded higher-kinded type parameters for type scala$collection$generic$MapFactory$$CC; assuming they are invariant
warning: encountered F-bounded higher-kinded type parameters for type scala$collection$generic$GenSetFactory$$CC; assuming they are invariant
warning: encountered F-bounded higher-kinded type parameters for type scala$collection$generic$SetFactory$$CC; assuming they are invariant
./scala-scala/src/library/scala/collection/mutable/IndexedSeq.scala:26: error: overriding method companion in trait IndexedSeq of type =>
  scala.collection.generic.GenericCompanion[[+hk$0] =>
    scala.collection.IndexedSeq[hk$0]
  ];
 method companion of type =>
  scala.collection.generic.GenericCompanion[[hk$0] =>
    scala.collection.mutable.IndexedSeq[hk$0]
  ] has incompatible type
  override def companion: GenericCompanion[IndexedSeq]  = IndexedSeq
                 ^
four warnings found
one error found
there were 2 deprecation warning(s); re-run with -deprecation for details

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