0.6.4 Change list
Changes / improvements
- Const vector -> const slice implicit conversion.
- Slicing arrays, slices and bytes at compile time #1466.
- Better error for
int a[4] = .... #1518 - Better error for
int Foo(int a)declarations #1516 - Improve error message in the case of
MyInterface x = foo;#1522 - Deprecate
@adhoc, allow non-nested ad hoc generic types. - Constant bytes <=> char[] conversion should work #1514.
- Infer now works across ternary.
- Interfaces now support .ptr and .type directly without casting to
any. - Switch to
<* *>docs. - Improve error messages on expressions like
var $type = int;#1553. - Disallow casting a
void*toanyor an interface, unless it isnull. - Defer resolution of declarations when looked up in
defaliased #1559. - Adding constants to the Json AST #1540
- Adding info to the globals inside Json AST #1541
- Null-check function pointer invocation #1573.
string::new_struct_to_strandio::struct_to_formatto dump struct data.io::printwill now print structs.- Improve error message when using
voidaliases as variable storage type. - Add a target type: "prepare" which doesn't compile anything (but may run
exec)
Fixes
Unsupported int[*] $x = { 1, 2, 3, 4 }#1489.- Unexpected compile error using a typed constant with
copysign#1517 - Incorrect subscript resolution #1519.
- Segfault with passing a program with
-using stdin. - Using no module with
-would reject the program. - Unintended deref of pointers with methods caused regression with hash function.
- Fix broken sincos function.
- Bug when a continue is copied in a defer.
- Compiler error when any/interface initialized using {} #1533.
- Bug when defers and $if were combined in a macro, which would cause miscompilation.
- Fixes to the CSV reader.
- Crash returning struct or vector from function using ternary expression #1537.
- Improved error message on invalid subscript index type #1535.
- Improved error message when declaring a variable
void!. - Cannot use void as a generic parameter #1546
- Interfaces not correctly copied with generics #1545
- Memory leak in keys.new_list fixed.
- Standard library is now correctly weakly linked, fixing the use of C3 .so together with executable. #1549, #1107.
- Wrong error message for interface methods with body #1536.
- Empty expression block would crash compiler with debug on #1554.
- Improve infer conversions on constants, e.g.
ZString a = foo ? "a" : "b";#1561 - Show error when declarations do not start with
fnin interfaces. #1565 if (try foo)was handled incorrectly inside a defer.&selfargument not implicitly null checked. #1556.(uptr)&((Foo*)null).aincorrectly inserts a null check. #1544- Incorrect error message when
$evalis provided an invalid string. #1570 HashMap.copy_keysdid not properly copy keys which needed to be allocated #1569- Named vector component access would not fold at compile time. #1574
$definewould occasionally not properly evaluate declarations it encountered.- Fixes with error handling recursive
@tag#1583. - Sometimes generating introspection info would not be in the global scope causing a crash #1586.
- @tag on macros cannot be retrieved with tagof #1582
- Taking the $typeof of a wildcard optional returns
void!.
Stdlib changes
- Remove unintended print of
char[]as String - Add read/write to stream with big endian ints.
- Move accidently hidden "wrap_bytes".
- Added CBool #1530.
- Added encoding/base32 module.