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).
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).
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.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.