Issue #1168: Lowering: .map(fn((at, ty)) { (at, ty.clone()) }).collect() into Vec[(i64, String)] fails in rustc (EitherText vs String)

Open and answer this issue on GitHub.

ready · opened 2026-11-02 · updated 2026-11-02 · 0 comments

Found during the M7 move (Part of #125).

Probe: in a user program, xs.map(fn((at, ty)) { (at, ty.clone()) }).collect() collected into Vec[(i64, String)] passes the Nikaia check. The lowered Rust is then refused by rustc with mismatched types: the clone lowers as EitherText, where String is expected.

To build

  1. Add a tests/compiler/ program with this map and collect, and its .stdout.
  2. Fix the lowering so a text clone inside a tuple a lambda returns lowers to the declared element type. The test passes at --both-settings.

Back to Open Issues