Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions NOW.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

Last updated: 2026-08-08

## typecheck: promote call-arity mismatch from warning to hard error (Closes #1921)

- The arity check existed but only warned, and nothing reads warnings (tri-net's hook greps 'Typecheck OK'; gen paths skip typecheck) -- two tri-net specs shipped wrong-arity calls for months (tri-net#323)
- Now: error_count += 1, ok = false -- the specs-typecheck gate actually blocks the class
- Sweep: zero arity violations remain across tri-net's 100+ specs post-#323, so the promotion breaks nothing (27 specs have PRE-EXISTING unrelated typecheck errors, identical under stock t27c)
- Unit suite 1537/1537; FROZEN_HASH resealed

## fix(gen-c): [T;N] params, test-block bindings, t27_assert macro (Refs #1919)

- Rust-style `[T; N]` parameter types now lower to `T*` (previously emitted a bare `* name` -- no base type)
Expand Down
7 changes: 6 additions & 1 deletion bootstrap/src/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12713,7 +12713,12 @@ fn check_expr(node: &Node, symbols: &[SymbolEntry], fns: &[FnEntry], result: &mu
.filter(|c| c.kind != NodeKind::Module)
.collect();
if call_args.len() != fn_entry.params.len() {
result.warnings += 1;
// Arity mismatch is a HARD error: two tri-net specs shipped
// mismatched calls for months because this only warned and
// nothing reads warnings (tri-net#323). Wrong-arity calls
// mangle in every backend.
result.error_count += 1;
result.ok = false;
result.errors.push(format!(
"function '{}' expects {} args, got {} at line {}",
node.name,
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/stage0/FROZEN_HASH
Original file line number Diff line number Diff line change
@@ -1 +1 @@
409ab06144271d348b7ffdb0332a032c13928984f21c8fc0f838df5ecd6caa28
8770de8b22dfda24d5c4099b2610c4a5a6efd49e43a19e335f08eeb09f788743
9 changes: 8 additions & 1 deletion docs/NOW.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# NOW — fix(gen-c): params, test bindings, assert macro (2026-08-08)
# NOW — typecheck: arity mismatch is a hard error (2026-08-08)

Last updated: 2026-08-08

## typecheck: promote call-arity mismatch from warning to hard error (Closes #1921)

- The arity check existed but only warned, and nothing reads warnings (tri-net's hook greps 'Typecheck OK'; gen paths skip typecheck) -- two tri-net specs shipped wrong-arity calls for months (tri-net#323)
- Now: error_count += 1, ok = false -- the specs-typecheck gate actually blocks the class
- Sweep: zero arity violations remain across tri-net's 100+ specs post-#323, so the promotion breaks nothing (27 specs have PRE-EXISTING unrelated typecheck errors, identical under stock t27c)
- Unit suite 1537/1537; FROZEN_HASH resealed

## fix(gen-c): [T;N] params, test-block bindings, t27_assert macro (Refs #1919)

- Rust-style `[T; N]` parameter types now lower to `T*` (previously emitted a bare `* name` -- no base type)
Expand Down
Loading