You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
with check rejects an implicit-main file that with run and with build accept ("expected declaration" at the first top-level statement) #1759
Spec/docs: implicit main — a .w file needs no fn main; top-level statements are the program (CLAUDE.md "Implicit main", §18.5b one-liners).
use std.process
print("hi")
$ with run im.w
hi
$ with check im.w
error: expected declaration (fn, type, enum, let, use, extern)
--> im.w:2:1
with build im.w -o x also accepts it. Only check parses the file as a plain module, so every With tool script (tools/*.w) can't be type-checked with with check, which is the iterate tier's cheapest command. Found while writing tools/battery.w. Expected: check applies the same implicit-main rule as run/build to an entry file.
Activity
Spec v7.6 (D74): entry sources vs module files; optional-chain field …
Driver, parser: a file with top-level statements is an entry source u…
LSP: an open root file is an entry source, as `check` now parses it (…
Parser: a top-level `let`/`var` is a module declaration unless the fi…
Type checker: D74 entry sources and chain moves, field-view bindings (w…