0.6.6 Change list
Changes / improvements
- Split help into normal and "full" help, #1703
- Removed 'headers' command line option.
- Add
enum.from_ordinalandfault.from_ordinal - Deprecate cast-style conversion from integer <-> enum.
- Make deprecation an error in test mode.
- Add
--win-vs-dirsto override VS detection dirs. - Add
"name"project property to override the name of the resulting binary. #1719 - Improved
add-projectto take arguments. - Improve error reporting when using type names as the function argument #1750.
- Improve ordering of method registration to support adding methods to generic modules with method constraints #1746
- Support experimental
@operator(construct)operator overload. - Allow using 'var' to declare lambdas in functions.
- Add 'validation' setting and make dead code a warning.
- Allow compile time
$foreachiteration over constant Strings and bytes. - Improved error message when accessing
@privatefrom other modules #1769. - Include
@namewhen searching for possible matches tonamein the error message. #1779 - Improve
@paramparse errors #1777 - Improved
#fooresolution inside of the compiler. - Deprecated '&' macro arguments.
- Deprecate `fn void! main() type main functions.
- Deprecate old
void!@benchmark and @test functions. - Allow test runners to take String[] arguments.
- Added
--lspoutput. - Improve the error message when running out of memory.
- Allowed passing arguments to @test / @benchmark runners via
c3c test[benchmark] -- -o --opt1 <arg1> - Handle bytes and string literals the same way in terms of zero termination.
- Function comments are stored and displayed with -P.
- Prevent
#hasharguments from taking code that modifies ct variables. #1794 - Make stringify to recursively enter
#hashexpressions #1834.
Fixes
- Fix case trying to initialize a
char[*]*from a String. - Fix Map & HashMap
put_all_for_createnot copying all elements, causinginit_from_mapto create incomplete copy. - Fix bug when a macro calling an extern function was called in another module also declaring and calling the same function. #1690
static-libanddynamic-liboptions from the command line now produces headers.- Fix bug outputting exported functions without predefined extname.
- Fix problem where crt1 was linked for dynamic libraries on Linux and BSD. #1710
- Fix CRT detection on Arch Linux.
- Fix lexer allowing a trailing underscore (_) with hex and binary literals.
- Fix
--list-operatorsCLI command printing underscore (_) and hash (#). - Fix bug in temp allocator when temp memory is exhausted and allocation needs overaligned mem. #1715
- Incorrectly handles distinct enums and pointers with '+=' and '-=' #1717.
- Prevent DString from being initialized with "".
- Fix bug in OnStackAllocator when freeing overallocated data. #1720
- Use
weak_odrrather thanweakon Windows which seems to prevent issues such as #1704. - Use
weakon dyn-symbols on Linux. - Fix crash on project.json not having an empty set of targets.
- Miscompile when indexing an array with small unsigned types for enums.
- Change CBool to be 1 byte.
any_to_intchecks value to be int and no longer works with enum.- Add check in formatter printing "%c".
- Fix bug where
!!and!was not recognized to jump out of the current scope. - Fix bug when including compile time parameters in trailing body more than once.
- Fix issue with compiling a constant struct containing a string array in a local context.
- Fix error where panic would not properly stop the program when stacktrace couldn't be printed #1751.
- Macros with default arguments to
&,#and type parameters didn't work as expected. #1754. net::poll()with negative timeout behaved incorrectly.- Return type inference bugs with macros #1757
$definedin a global scope should accept testing normal macros.- Assert on add to uninitialized ct variable #1765.
- Dynamic function lookup fails after changing type without dummy anycast #1761
- $vasplat was allowed inside of a function when passed as an argument to a function.
- Prohibit raw vaargs in regular functions with a function body.
- Assert on certain slice to slice casts. #1768.
- Fix vector float -> bool conversion.
- Fix
+a = 1erronously being accepted. - Fix not freeing a zero length String
- Macros with trailing bodys aren't allowed as the single statement after a while loop with no body #1772.
- Deref subscripts as needed for macro ref method arguments. #1789
- Change ordering to simplify adding methods to type in conditional modules.
#foostyle arguments were not type checked when given a type. #1790- Bug when using +++ on value build a slice or array: the rhs cast was not done.
- Fix bug preventing compile time slices from being iterated over with
$foreach. - Fix bug with defer assignment in macro #1807.
- Fix regression with swizzle references for vectors #1810.
- Assert when partially initializing a constant struct containing a slice #1812.
- Assert concatenating constant slices #1805.
- Do not link "ld" on Linux with no libc.
- Fix bug when multiple
$elseclauses followed an$if#1824. - Report the correct type as not having a method when access fails #1828.
- Prevent temp arena scribbling from causing an asan warning. #1825
- Fix bug where
&i[0] = nullwas not detected to be an error #1833.
Stdlib changes
- Increase BitWriter.write_bits limit up to 32 bits.
- Updates to
Slice2d, likeget_xyand others. - Added
iter()value_iter()andkey_iter()to HashMap. - Add "tokenizer" to String.
- Add "skip_empty" to split methods. Add split_to_buffer method.
- Add
@enum_from_value. - Updated hash function.
- Added URL parser.
- Added convenience functions to
Maybe. - Added
String.trim_left()and.trim_right(). - Deprecation of several
¯os. - Format functions for timedates.
- Add
@assert_leak()to assert on memory leaks in the scope. - Added
double.set_high_word(),double.set_low_word(), andfloat.set_word().