Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ZIO.Chunk classCast exception #3242

@ahoy-jon

Description

@ahoy-jon

I am working on #3241

I created this test :

    test("heterogeneous") {
      val h: Chunk.NonEmpty[AnyVal] = Chunk(1, 1.0, true)
      val m: Chunk.NonEmpty[AnyVal] = h.map(identity)

      assert(h)(equalTo(m))
    }

with this error

java.lang.ClassCastException: class java.lang.Double cannot be cast to class java.lang.Integer (java.lang.Double and java.lang.Integer are in module java.base of loader 'bootstrap')

Is that behavior normal?
Should we update the documentation in https://github.com/zio/zio/blob/master/docs/datatypes/chunk.md ?

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