Issue #1064: check: a let annotation Vec[(String, String)] is ignored for a tuple-of-literals vector (NK1106 at process::run env)

Open and answer this issue on GitHub.

ready · opened 2026-10-31 · updated 2026-10-31 · 0 comments

Found by a builder on the driver (2026-10-31).

Probe

use std::process

fn main() throws {
    let env: Vec[(String, String)] = [("A", "1")]
    let r = process::run("true", []; env: env)
    println(r.ok)
}

The compiler refuses it with NK1106, “passing Vec[(ref String, ref String)]”. The declared type Vec[(String, String)] is ignored: the literal elements keep their ref String type instead of taking the annotation’s String. The same literal written inline in the call’s argument is accepted (scripts/drive.nika does it that way today).

To build

  1. Check: a let annotation gives its expected type to a vector literal of tuples, so string literals inside the tuples become String, as they do for a Vec[String] annotation.
  2. A test in tests/compiler/ with the probe above (expected stdout true), plus a case where the vector is reused after the call, if the annotation has to own it.

Back to Open Issues