Christoffer Lerno
a228eb020d
Allow splat in initializers.
2024-11-11 23:54:35 +01:00
Christoffer Lerno
c46933a81a
Refactor "splat" parsing.
2024-11-11 15:43:17 +01:00
Christoffer Lerno
746046c8c0
Fix bug where a > 0 ? f() : g() could cause a compiler crash if both returned void!.
2024-11-10 01:18:56 +01:00
Christoffer Lerno
acab95792f
Improve error message when incorrectly using Type as an rvalue.
2024-11-10 01:18:56 +01:00
Christoffer Lerno
b882265e52
Start work on 0.6.5
2024-11-10 01:18:56 +01:00
Christoffer Lerno
547f2ef189
Tighten up conversion rules for arrays and slices.
2024-11-10 01:16:01 +01:00
Christoffer Lerno
658fb4b1f9
Updated for 0.6.4 release.
2024-11-08 12:38:23 +01:00
Christoffer Lerno
08d1b29301
Add contracts on @catch / @ok. Taking the $typeof of a wildcard optional returns void!
2024-11-05 10:50:38 +01:00
Christoffer Lerno
741707273d
Add "prepare" target in project.json #1577
2024-11-04 22:46:19 +01:00
Christoffer Lerno
6258cba79a
@tag on macros cannot be retrieved with tagof #1582
2024-11-04 02:51:58 +01:00
Waqar Ahmed
213831289a
Fix compile with gcc 14.2.1 ( #1594 )
...
* Fix compile with gcc 14.2.1 Fixes -Werror=maybe-uninitialized warnings
* Updated to use INVALID_PTR rather than NULL.
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2024-11-04 00:20:14 +01:00
Christoffer Lerno
b06a611e69
Improve error message when using void aliases as variable storage type.
2024-11-01 14:56:29 +01:00
Christoffer Lerno
cd4fd02ee3
Sometimes generating introspection info would not be in the global scope causing a crash #1586 .
2024-10-31 21:27:46 +01:00
Ygor Pontelo
475972aecd
allow current directory as project ( #1580 )
...
* allow current directory as project
* avoid multiple underscores in module name
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2024-10-30 21:23:51 +01:00
Christoffer Lerno
b7a23e558a
Fixes with error handling recursive @tag #1583 .
2024-10-30 20:57:17 +01:00
Christoffer Lerno
827440686f
$define would occasionally not properly evaluate declarations it encountered.
2024-10-30 11:59:18 +01:00
Christoffer Lerno
cc6a24cf80
Null-check function pointer invocation #1573 .
2024-10-26 18:41:47 +02:00
Christoffer Lerno
b187d5a3fc
Named vector component access would not fold at compile time. #1574
2024-10-26 13:22:35 +02:00
Christoffer Lerno
c0c571ffe0
Incorrect error message when $eval is provided an invalid string. #1570
2024-10-25 10:31:45 +02:00
Christoffer Lerno
d8f4da4d90
Incorporating change from #1568 and the other fix needed.
2024-10-23 23:48:27 +02:00
Matteo Cardinaletti
f02387073d
Json AST: Adding 'constants' and Improving 'globals' #1540 , #1541
2024-10-23 23:31:28 +02:00
Christoffer Lerno
d344cc6020
(uptr)&((Foo*)null).a incorrectly inserts a null check. #1544 .
...
Fix regression handling typedefs from generic modules.
2024-10-22 12:15:39 +02:00
Christoffer Lerno
9100638400
&self argument not implicitly null checked. #1556 .
2024-10-21 00:45:40 +02:00
Christoffer Lerno
d2085654a7
if (try foo) was handled incorrectly inside a defer.
2024-10-20 18:30:03 +02:00
Christoffer Lerno
78d5939d9d
Show error when declarations do not start with fn in interfaces. #1565 . Some added functionality to lists and time.
2024-10-18 17:10:00 +02:00
Christoffer Lerno
c013006671
Improve infer conversions on constants, e.g. ZString a = foo ? "a" : "b"; #1561
2024-10-17 01:20:52 +02:00
Christoffer Lerno
705856d51a
- Disallow casting a void* to any or an interface, unless it is null.
...
- Defer resolution of declarations when looked up in `def` aliased #1559 .
2024-10-16 12:50:47 +02:00
Christoffer Lerno
4445b6c054
Improve error messages on expressions like var $type = int; #1553 .
2024-10-15 11:50:15 +02:00
Christoffer Lerno
31cd839063
Switch to <* *> docs. Fix issue with dynamically loaded C3 libs with other C3 code.
2024-10-14 02:14:34 +02:00
Christoffer Lerno
9f6a4eb300
Empty expression block would crash compiler with debug on #1554 .
2024-10-13 02:19:26 +02:00
Walther Chen
e6c9cfed42
Small fixes to AST json ( #1550 )
...
* fix ast json
* INERT_COMMA -> INSERT_COMMA
* fix struct field types
2024-10-12 19:28:47 +02:00
Christoffer Lerno
0da7f1b4de
Wrong error message for interface methods with body #1536 .
2024-10-12 02:51:07 +02:00
Christoffer Lerno
8ce171877e
Also weaken libc and generic templates.
2024-10-12 02:13:35 +02:00
Christoffer Lerno
d19f628c73
Return missing MSVC fix.
2024-10-12 00:05:50 +02:00
Christoffer Lerno
526d15b804
Stop using linkonce and use weak instead.
2024-10-11 23:56:29 +02:00
Christoffer Lerno
c308397ed6
Fix weak linking for windows.
2024-10-11 23:35:12 +02:00
Christoffer Lerno
cba25710fe
Refactor and unify linker visibility and fix issues with weak stdlib.
2024-10-11 21:45:44 +02:00
Christoffer Lerno
1b471283c9
- Don't weakly link in exe.
2024-10-11 18:11:27 +02:00
Christoffer Lerno
09fee2aa4b
- Standard library is now correctly weakly linked, fixing the use of C3 .so together with executable. #1549 , #1107 .
2024-10-11 17:14:02 +02:00
Christoffer Lerno
efeb9e627e
Interfaces not correctly copied with generics #1545 .
2024-10-11 13:26:22 +02:00
Christoffer Lerno
8e24f15d58
Cannot use void as a generic parameter #1546 . Interfaces now support .ptr and .type directly without casting to any.
2024-10-11 12:10:35 +02:00
Christoffer Lerno
1adad860f4
Update AST output.
2024-10-11 11:24:01 +02:00
Christoffer Lerno
cf07570871
Improved error message when declaring a variable void!.
2024-10-11 00:15:49 +02:00
Christoffer Lerno
bf30e52993
Improved error message on invalid subscript index type #1535 .
2024-10-10 14:59:16 +02:00
Christoffer Lerno
a91ddd40dd
Infer now works across ternary. Crash returning struct or vector from function using ternary expression #1537 .
2024-10-10 14:44:40 +02:00
Christoffer Lerno
967f14148f
Bug when defers and $if were combined in a macro, which would cause miscompilation.
2024-10-10 13:42:12 +02:00
Christoffer Lerno
7a6544b17c
Constant bytes <=> char[] conversion should work #1514
2024-10-09 19:38:06 +02:00
Christoffer Lerno
c1266e9d06
Compiler error when any/interface initialized using {} #1533 .
2024-10-09 13:12:40 +02:00
Christoffer Lerno
9f10996ac7
Bug when a continue is copied in a defer.
2024-10-08 22:13:30 +02:00
Christoffer Lerno
7dfdb9d061
Fix to ad hoc generic types.
2024-10-08 11:48:20 +02:00