Skip to content

grayscale: v0.4.0

Choose a tag to compare

@github-actions github-actions released this 14 Aug 11:51
a7d8259

0.4.0 (2026-08-14)

Features

  • attrs: add #discard attribute for unused return values (#2139) (94ad4fd)
  • builtins: add fields() builtin for struct field introspection (#2220) (a64c6db)
  • builtins: add system() builtin and document raw() (#2221) (12d460f)
  • lang: make variable declarations mutable by default (#2087) (5139454)
  • mem: add raw() builtin for unchecked pointer access (#2194) (095c958)

Bug Fixes

  • build: reject unknown make targets before running anything (#2370) (e9111bd)
  • codegen: bind map to temp in 'in' check to avoid rvalue address (#2315) (7a5a22d)
  • codegen: emit element-wise conversion for array casts (#2371) (33b1eac)
  • codegen: emit lvalue-safe code for ++/-- on struct fields through pointers (#2358) (7e41eb1)
  • codegen: emit tagged enum typedefs after struct body definitions (#2262) (15f7868)
  • codegen: forward-declare tagged enum types for self-referential payloads (#2319) (6bc4f51)
  • codegen: handle dereference args in raw() and addr() (#2322) (7fac2e5)
  • codegen: handle dereferenced container pointer operations (#2346) (acd78f7)
  • codegen: raw() on const struct no longer leaks C error (#2345) (d6fbe60)
  • codegen: rewrite cross-module type refs in merged imports (#2294) (cd91725)
  • codegen: scope-aware raw variable tracking for shadowed pointers (#2324) (928e6b2)
  • codegen: skip nil check for inline raw() dereference (#2323) (a4b379b)
  • codegen: skip struct deep-copy escape for pointer type assignments (#2317) (8df341c)
  • codegen: update raw status on pointer reassignment to addr/raw (#2325) (c86d1c0)
  • codegen: use dot access for multi-return temps with pointer types (#2314) (3299004)
  • parser: allow mut-less array declarations without triggering E2075 (#2363) (f173be9)
  • parser: allow repeated mut/const in multi-var declarations (#2349) (d6b076f)
  • parser: allow size_of(^T) pointer type expressions (#2353) (29c1ddf)
  • parser: reject #discard attribute on struct fields (#2360) (e4794d1)
  • tests: update strconv from_float expectation to match shortest-roundtrip output (#2337) (8f44593)
  • typechecker,codegen: allow ++/-- on pointer dereference targets (#2351) (db1139e)
  • typechecker: auto-dereference pointers from expressions, not just variables (#2355) (333b56c)
  • typechecker: propagate expected type for struct field array initializers (#2263) (85ca91e)
  • typechecker: reject bare pointer as if/for condition (#2356) (9371df9)
  • typechecker: reject different enum types in inline array literals (#2368) (6604a6f)
  • typechecker: reject different struct types in inline array literals (#2367) (1b9d782)
  • typechecker: reject dot-notation calls on non-struct variables (#2354) (56d9b88)
  • typechecker: reject empty inline array literals with no type context (#2369) (2a2c2fa)
  • typechecker: reject import statements after file-scope declarations (#2364) (66f74dd)
  • typechecker: reject int/uint mixing in inline array literals (#2366) (5a09c47)
  • typechecker: reject mixed pointer element types in array literals (#2359) (7437a18)
  • typechecker: reject nested array literals with mismatched element types (#2365) (a6eb829)
  • typechecker: reject ref() reassignment with incompatible signature (#2350) (9cbe510)
  • typechecker: reject type mismatch on pointer dereference assignment (#2342) (49e8541)
  • typechecker: reject type names as arguments to raw() and addr() (#2343) (42f48d8)
  • typechecker: reject type names in fields() builtin (#2361) (c712784)
  • typechecker: reject zero-arg calls to builtins that require arguments (#2344) (7188dbd)
  • typechecker: use cross-module-aware type comparison in assignments and array literals (d761ac8)
  • typechecker: validate argument count and types for ref() calls (#2347) (c831255)
  • typechecker: validate field access through explicit pointer dereference (#2357, #2352) (0c15217)

Performance Improvements

  • codegen: replace linear scans with bsearch for alias and enum lookups (#2331) (b38e03d)
  • stdlib: fix insert_at() overflow UB and use panic infrastructure (#2335) (6b41915)
  • stdlib: iterate order array instead of capacity in JSON map encoders (#2333) (45d2d94)
  • stdlib: replace O(n²) deduplicate with O(n) hash set (#2334) (63d1b47)
  • stdlib: use uninitialized arena alloc for immediately-overwritten buffers (#2332) (5f4cf54)
  • typechecker: extract mark_import_used() to replace 10 inline loops (#2330) (b806c9d)