Open and answer this issue on GitHub.
ready · opened 2026-11-07 · updated 2026-11-07 · 0 comments
Found (while building #1285): in package mode, lower-std accepts a sync function in crates/nikaia-std/src/tools/ that calls a function inferred as async. The lowered Rust then writes .await inside a non-async fn, and rustc rejects it. The check should catch this, as it does for programs (NK2202 family).
Probe: in a tools/*.nika, write fn a() -> i64 { ...something that pauses... } (no sync, so it is inferred async), and pub fn b() -> i64 sync { a() }. Run nikaia lower-std: it passes, and cargo build fails on the .await in b.
To build
tools/check_* refuses a sync function that calls an async one, with the same code and message as a program gets.tests/compiler/ with the expected .stderr.Done when the probe fails at lower-std, not at rustc.
Generated by Claude Code