Skip to content

No BuildFrom for IArray #19229

Open
Open
@bishabosha

Description

@bishabosha

Compiler version

3.3.1

Minimized code

def diffs(ns: IArray[Long]): IArray[Long] =
  ns.lazyZip(ns.tail).map((a, b) => b - a)

Output

Cannot construct a collection of type C with elements of type Long based on a collection of type IArray[Long]..
I found:

    scala.collection.BuildFrom.buildFromIterableOps[CC, A0, A]

But method buildFromIterableOps in trait BuildFromLowPriority2 does not match type scala.collection.BuildFrom[IArray[Long], Long, C]

where:    C is a type variable with constraint <: IArray[Long]

Expectation

compiles

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