Skip to content

Support wrapper inheritance #10

@alexeyr

Description

@alexeyr

Currently we have

 def arr: Rep[WArray[scala.Tuple2[A, B]]] = WPredef.genericArrayOps[A](PairCol.this.as.arr).zip[A, B, WArray[scala.Tuple2[A, B]]](/*WPredef.genericWrapArray[B](PairCol.this.bs.arr)*/???)(WArray.canBuildFrom[scala.Tuple2[A, B]](((element[scala.Tuple2[A, B]]): Elem[scala.Tuple2[A, B]])).asRep[WCanBuildFrom[WArray[A], scala.Tuple2[A, B], WArray[scala.Tuple2[A, B]]]]);

in https://github.com/scalan/scalanizer-demo/blob/0a8ca8e436b377805b96ef70ecb1c2035d9121e8/src/main/scala/scalanizer/collections/impl/ColsImpl.scala#L478 because the commented out version doesn't compile: WWrappedArray doesn't extend WGenIterable. If we have two wrappers of a subtype and a supertype (possibly indirectly) the subtype wrapper should extend the supertype wrapper.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions