Skip to content

| conbinator calls toString on objects with default toString implementation #248

@senia-psm

Description

@senia-psm

a.map(...) | b.map(...) produces a strange error message which includes toString of Function:

  private val a = Options.text("a").map(identity)
  private val b = Options.text("b").map(identity)

      command = Command("test", a | b),
 $ ./bin/test -a a -b b
Options collision detected. You can only specify either
Map(Single(a,Vector(),Text,Empty,None),zio.cli.Options$$Lambda$16/0x0000000800cc
13e0@37b3bd45) or
Map(Single(b,Vector(),Text,Empty,None),zio.cli.Options$$Lambda$16/0x0000000800cc
13e0@56d5379).

See minimal reproducer here: https://github.com/senia-psm/zio-cli-248

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