From 93340f97dce404a008f489729df144ace53528ab Mon Sep 17 00:00:00 2001 From: zinc Date: Wed, 14 Oct 2026 10:38:17 +0000 Subject: fix std hover, full capture terminator, bare static calls, void main in run-only images - hover: a symbol from an embedded library source (tinyvm:std.zc, tinyvm:icon.zc) was looked up only in the document; look it up by its qualified name in the library source (hover_embedded_sym), and render a method found that way by its line (bs_hover). - std.capture: allocate one word more than the 256 it holds, so end() terminates inside the buffer. - a bare call to a static function of the enclosing struct resolves like a bare struct constant (mstruct is set for every non-generic struct's methods); the struct's own wins over a global. - run.zc declares main untyped (fn main();), so a run-only image accepts int, void or untyped main with both compilers. --- TODO.md | 4 ---- 1 file changed, 4 deletions(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index d093cab..e0918a9 100644 --- a/TODO.md +++ b/TODO.md @@ -207,10 +207,6 @@ sorted by how hard each is to implement; the final full suite stays last. items with an architecture note carry the design worked out so far, enough to brief someone without re-reading the code. -- [ ] hover on standard-library members (`std.Text.itoa`, `std.array_contains`, a group name) returns nothing in the language server, though completion shows the same documentation; a struct static function in the document itself does show its hover. find where `do_hover` resolves qualified library members and fix it, with a hover check. -- [ ] `std.capture.end` writes its terminator at `rt.outbuf[rt.outn]`; when more than 256 characters were captured, `outn` equals the capacity and the 0 lands one word past the buffer. check and fix, with a regression program. -- [ ] a bare call to a sibling static function inside a struct's method (`lim()` for a static `lim`) reports `lim is used but never defined`; resolve it like the bare struct constants now are (`mstruct` in the declarations part). -- [ ] a run-only image accepts `void main()` from zc0 but the self-hosted compiler rejects it against `run.zc`'s `int main();` prototype; make the two agree. - [ ] remaining zc0 gaps: string literals over 4095 bytes, `embed` of an array type inside a function, `x as T` with more than a single name (`x as int*`), zc0 silently accepting `.u` on a parameter, and integer literals (`010` is 8 in zc0, 10 in the compiler; zc0 saturates on overflow). `docs/history/43-stdlib/notes.md` still says zc0 reserves u/m/d: add a pointer forward rather than rewriting history. - [ ] (in flight) verify both compilers against `docs/SPEC.md` with a fresh agent that did not write it: expectations derived from the spec text before running anything, one program per rule under `tests/conformance/
/`, a runner `tests/conformance/run.sh`, each failure classified as self-hosted bug, zc0 bug, or spec error, and appendix b confirmed item by item. then add the runner to `tests/test.sh`. - [ ] fix the implementation bugs listed in `docs/SPEC.md` appendix b, once confirmed: `memdebug scrub;` rejected; enum members can't reference earlier members; a plain function redefinition silently shadows the first; a prototype after the definition hides it; `?:` with one int and one float branch gives garbage; `bool` not normalised; float global initializers rejected; a global initializer naming another global uses its address; `include std;` inside a function body; syntax-error recovery hiding later errors; unterminated `/*` and string literals; `x as int * y`; prototypes needing parameter names; `len(char*)` with typecheck off; duplicate `case` labels; local `const` in constant expressions; constant expressions without precedence (`1+2*3` is 9). fix the prose items the appendix lists too. -- cgit v1.2.3