v0.2.9
Full Changelog: v0.2.8...v0.2.9
Vix Language v0.2.9 Release Notes
Release Date: 2026-05-31
Diagnostics
Array parameter value-semantics warnings
- Added compile-time warnings for array parameters that are passed by value and then modified inside a function.
- The compiler now warns when a copied array parameter is modified without returning the modified array, helping catch code that accidentally assumes reference semantics.
- The compiler now warns when an array parameter length is read before modifying the copied parameter, highlighting stale-length patterns such as returning the old length after
push. - The compiler now warns when an array parameter is never used.
- Files:
src/Typeck/Typeck.cpp,tests/test_types.py
Cleaner warning output
- Improved warning formatting so multiline diagnostic messages render separate
notelines instead of being flattened into one long line. - Warning headers now use a more readable
warning: ...plus--> file:line:columnlayout. - Warning summaries now report the total warning count as
Found N warnings. - Removed
helptext from warnings to avoid suggesting unsupported syntax or language features. - Files:
src/utils/error.c,include/compiler.h,src/main.c
Code Generation
Global dynamic array push now writes back reallocated pointers
- Fixed
array.push(...)on global dynamic arrays so the data pointer returned byreallocis stored back into the global variable. - Fixed pushed struct elements so arrays such as
[Point]allocate using the struct element size and store the struct value, not a pointer byte sequence. - This fixes programs that build a global array with repeated
pushcalls and then iterate it withfor. - Files:
src/compiler/Funcs.cpp
Bug Fixes
For-loop numeric type promotion
- Fixed a type mismatch error when using a
forloop with a range where the start and end are different numeric types (e.g.,0 .. bytes_readwhere0isI32andbytes_readisI64). - The compiler now allows implicit numeric promotion between integer and float types in range expressions.
- Modified
src/Typeck/Typeck.cppto usepromote_numericfor range bounds. - Modified
include/unify.hto allow numeric type compatibility in unification. - Files:
src/Typeck/Typeck.cpp,include/unify.h
Example
Given:
fn add_point(points: [Point], p: Point): i32 {
let id = points.length
points.push(p)
return id
}
vixc now reports that points is copied, its mutation is lost, and the earlier length read may be stale relative to the copied mutation.
Validation
- Rebuilt
vixcsuccessfully. - Verified
src/test.vixemits the new array-parameter warnings. - Verified
src/test.vixnow compiles successfully (only an unused variable warning remains). - Verified warning output no longer emits
helplines or#[warn(unused_variables)]text. - Verified
src/test2.vixnow prints the pushed globalPointvalues instead of producing no output. - Verified standalone fixtures for copied-array mutation and unused array parameter warnings.
- Python test execution could not be run in this environment because
pytestis not installed.