Issue #3013: fn second[T](a: T, b: T) -> T { return b } `fn made() -> String { return…

Open and answer this issue on GitHub.

ready, bugs, queued · opened 2026-12-01 · updated 2026-12-01 · 0 comments

Filed by the driver from the Found: of the run of issue-2789 (#2789) (owner, 2026-11-06).

Found

fn second[T](a: T, b: T) -> T { return b } fn made() -> String { return "hi" } fn main() throws { let x: String? = null; let g = second(x, made()); println(f"{g ?? "none"}") } draws NK1343 “temporary value dropped while borrowed” (on HEAD before this fix too; with this fix also let s: String = "hi"; let b = first(s, null)); it should print hi (Part I 2.3); the emitter writes second(&x, &Some(__nikaia_held_0)), the Some stays a temporary; suspected emit_core_reads.nika emit_core_hold_viewed_arguments, which holds the argument but not its nullable wrap (check: –emit-rust of the probe)

To build

Done when

The probe or check gives the expected output the first item names from its ADR or Part I-III section, and a tests/compiler/tests/ test (or the named check) that failed on the unfixed tree is green; or the probe already passes on develop and a test pins it, naming the commit that fixed it; or the issue is closed as by design, naming the function or ADR.


Generated by Claude Code

Back to Open Issues