Christoffer Lerno
3eb8f68ded
- Add lenof() compile time function #2439
...
- Fix release notes
2025-09-06 18:17:17 +02:00
Christoffer Lerno
bd9bc118db
Allow doc comments on individual struct members, faultdefs and enum values #2427 .
2025-09-06 16:18:33 +02:00
Christoffer Lerno
95375a2591
Overloading &[] should be enough for foreach. #2466
2025-09-06 15:18:26 +02:00
Zack Puhl
078d9dc0b7
Add LinkedList Operators and Update Tests ( #2438 )
...
* Add LinkedList Operators and Update Tests
* add linkedlist printing and `@new` macros (single-line init and pool-capable)
* add linkedlist node and reg iterator; comparisons w/ ==
* Fix benchmarks. Drop random access to the linked list using []. Only return a direct array view.
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-09-06 11:57:21 +02:00
Christoffer Lerno
69b3263a00
- Added path::home_directory, path::documents_directory, path::videos_directory, path::pictures_directory, path::desktop_directory, path::screenshots_directory,
...
`path::public_share_directory`, `path::templates_directory`, `path::saved_games_directory`, `path::music_directory`, `path::downloads_directory`.
Fix codegen bug in expressions like `foo(x()) ?? io::EOF?` causing irregular crashes.
2025-09-06 02:27:10 +02:00
Christoffer Lerno
e605a21fd3
Revert "Revert 0.7.6 code for 0.7.5 re-release"
...
This reverts commit d1349c9cfb .
2025-09-05 23:30:35 +02:00
Christoffer Lerno
d1349c9cfb
Revert 0.7.6 code for 0.7.5 re-release
2025-09-05 18:42:54 +02:00
niedlich
cf14787552
Typo fixes ( #2457 )
...
* fix typos in comments and strings
* fix typos in symbols (and some comments/strings)
* fix typos in releasenotes.md
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-09-04 01:07:07 +02:00
Book-reader
10241df23c
Add generic InterfaceList type for storing values that implement a specific interface ( #2433 )
...
* Add generic InterfaceList type
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-09-03 22:58:27 +02:00
Christoffer Lerno
8795ffc4f1
Returning pointer to index of slice stored in a struct from method taking self incorrectly detected as returning pointer to local variable #2455 .
2025-09-03 01:02:25 +02:00
Christoffer Lerno
e25812a071
$defined(x[0] = val) causes an error instead of returning false when a type does not have []= defined #2454
2025-09-03 00:08:43 +02:00
Christoffer Lerno
14a929588a
Confusing error message when type has [] overloaded but not []= #2453
2025-09-02 23:56:15 +02:00
Christoffer Lerno
02d1486af9
- Compiler assert with var x @noinit = 0 #2452
2025-09-02 23:39:00 +02:00
Christoffer Lerno
a3a6319bcf
Fix tests
2025-09-01 13:32:40 +02:00
Christoffer Lerno
17dfbb377e
Fixed test.
2025-09-01 13:05:14 +02:00
Christoffer Lerno
ff39f14dd1
$defined(Foo x = $vaexpr[0]) works correctly.
2025-09-01 12:09:14 +02:00
Christoffer Lerno
af4309b286
$defined returns an error when assigning a struct initializer with an incorrect type #2449
2025-09-01 10:44:19 +02:00
Christoffer Lerno
3a69c9f1fe
Fix test.
2025-09-01 01:18:17 +02:00
Christoffer Lerno
a751177a3e
Const enum methods are not being recognized. #2445
2025-08-31 23:56:48 +02:00
Christoffer Lerno
cb006dd715
- Compiler module-scope pointer to slice with offset, causes assert. #2446
2025-08-31 23:18:27 +02:00
Christoffer Lerno
c7f09f2879
Disambiguate types when they have the same name and need cast between each other.
2025-08-31 15:16:52 +02:00
Christoffer Lerno
fafcf3d0a9
Enum inference, like Foo x = $eval("A"), now works correctly for $eval.
2025-08-30 15:24:11 +02:00
Christoffer Lerno
10bc68fb39
Fixed regression with optional argument macros and lambdas.
2025-08-30 01:00:24 +02:00
Christoffer Lerno
47316dac59
Add compile time ternary $val ??? <expr> : <expr>.
2025-08-28 01:56:05 +02:00
Christoffer Lerno
90d3f429aa
- @test/@benchmark on module would attach to interface and regular methods.
2025-08-28 00:28:32 +02:00
Christoffer Lerno
239d249f01
- Added $kindof compile time function.
...
- Deprecated `@typekind` macro in favour of `$kindof`.
- Deprecated `@typeis` macro in favour of `$typeof(#foo) == int`.
2025-08-27 20:38:12 +02:00
Christoffer Lerno
7312c10b9e
- @is_const is deprecated in favour of directly using $defined.
...
- `@is_lvalue(#value)` is deprecated in favour of directly using `$defined`.
2025-08-27 18:21:55 +02:00
Christoffer Lerno
28b9be64ee
Update error message for missing body after if/for/etc #2289 .
2025-08-27 12:37:01 +02:00
Christoffer Lerno
d2cae909e1
A file with an inferred module may not contain additional other modules.
2025-08-27 11:42:53 +02:00
Christoffer Lerno
e194081e21
Fix test.
2025-08-27 10:45:59 +02:00
Christoffer Lerno
f7143c1852
Fix tests, reenable LLVM 22
2025-08-26 20:55:58 +02:00
Christoffer Lerno
c17cb7d0ca
Fix alignment on jump table.
2025-08-26 20:09:04 +02:00
Christoffer Lerno
cb17cfff7d
Deprecation of @assignable_to
2025-08-26 13:21:42 +02:00
Christoffer Lerno
1634217fc4
Grabbing (missing) methods on function pointers would cause crash #2434 .
2025-08-25 16:39:17 +02:00
Christoffer Lerno
bc9b0900a5
- Inlining a const as an lvalue would take the wrong path and corrupt the expression node.
2025-08-25 15:26:47 +02:00
Zack Puhl
410a25f334
Add array @reduce, @filter, @any, @all, & @indices_of ( #2419 )
...
* wip: array reduce and any/all
* wip: continue adding more functional-like array module functions
* wip: documentation and other fixes
* finish unit tests, require INDEX variable in lambdas, ready for first review
* don't worry about iterating by ref (it wasn't passing it that way anyhow)
* update release notes again
* simplify, remove "summary operators" and related tests
* Use more $defined, remove "has_operator". Fix regression in `$defined(var $f = 123)`
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-08-25 14:47:08 +02:00
Christoffer Lerno
9bf933ae31
- has_tagof on tagged lambdas returns false #2432
2025-08-23 23:41:32 +02:00
Christoffer Lerno
a69ee59b82
Fix tests.
2025-08-23 22:49:33 +02:00
Christoffer Lerno
961aa0ef61
Struct and typedef subtypes inherit dynamic functions.
2025-08-23 22:31:29 +02:00
Christoffer Lerno
48318c3ad4
Fixed tests.
2025-08-23 19:43:01 +02:00
Christoffer Lerno
a004cd3d03
Lambdas on the top level were not exported by default. #2428
2025-08-23 19:40:18 +02:00
Christoffer Lerno
768ce6092d
@tag was not allowed to repeat.
2025-08-23 18:42:57 +02:00
Christoffer Lerno
e4e499edd2
Allow $defined take declarations: $defined(int x = y)
...
Taking the address of a label would cause a crash. #2430
2025-08-23 12:00:17 +02:00
Christoffer Lerno
f36e9fea48
Types converts to typeid implicitly.
2025-08-22 00:26:18 +02:00
Christoffer Lerno
e2e2ca1d7f
Add @safeinfer to allow var to be used locally.
2025-08-21 12:39:08 +02:00
Christoffer Lerno
a2ef63f5b6
Error if a stack allocated variable is too big (configurable with --max-stack-object-size).
2025-08-21 00:33:56 +02:00
Christoffer Lerno
28ffb864a3
Deprecated PollSubscribes and PollEvents in favour of PollSubscribe and PollEvent and made them const enums.
2025-08-19 12:20:17 +02:00
Christoffer Lerno
551ce34b9b
- foo[x][y] = b now interpreted as (*&foo[x])[y] = b which allows overloads to do chained [] accesses.
2025-08-19 01:57:51 +02:00
Christoffer Lerno
de09a19a48
- Incorrect type checking when &[] and [] return optional values.
...
- Failed to find subscript overloading on optional values.
- Added `&[]` overload to HashMap.
2025-08-19 00:41:40 +02:00
Christoffer Lerno
eeab73df4e
Miscompilation of do-while when the while starts with a branch #2394 . Also: change do-while to make the lowering follow the execution.
2025-08-18 21:04:52 +02:00