Commit Graph

97 Commits

Author SHA1 Message Date
Christoffer Lerno
dc52478c09 - Warn on use of visibility modifiers on methods. #2962 2026-02-21 21:10:08 +01:00
Christoffer Lerno
ae5047b73f Deprecating multi-level array length inference. int[*][*] is deprecated and will be removed 0.8.0. 2026-01-22 23:50:39 +01:00
Christoffer Lerno
cdabe8fd9e - Create optional with ~ instead of ?. return io::EOF?; becomes return io::EOF~.
- Deprecated use of `?` to create optional.
2026-01-20 16:10:28 +01:00
Christoffer Lerno
f3b71ed7eb - $$MASK_TO_INT and $$INT_TO_MASK to create bool masks from integers and back.
- Fix bug when creating bool vectors in certain cases.
2025-12-25 20:55:11 +01:00
Christoffer Lerno
996f8a6a4d Shuffle names as <-> to 2025-12-16 16:15:01 +01:00
Christoffer Lerno
e49e3e32e7 - Fix error message when a method has the wrong type for the first argument.
- Add `any.to` and `any.as`.
2025-12-16 16:02:56 +01:00
Christoffer Lerno
15662bd32f Typedefs and structs with inline types supporting lengthof would not work with lengthof #2641. 2025-12-12 20:57:32 +01:00
Christoffer Lerno
9d79c3f33d - $defined(hashmap.init(mem)) causes compiler segfault #2611. 2025-11-30 00:08:46 +01:00
Christoffer Lerno
4e66693065 - Refactored @simd implementation.
- Regression vector ABI: npot vectors would load incorrectly from pointers and other things. #2576
2025-11-16 01:37:39 +01:00
Christoffer Lerno
9f55a74d2e Remove use of find_len and len_from_list. Rename lenof to lengthof 2025-09-06 18:35:03 +02:00
Christoffer Lerno
3eb8f68ded - Add lenof() compile time function #2439
- Fix release notes
2025-09-06 18:17:17 +02:00
Christoffer Lerno
10bc68fb39 Fixed regression with optional argument macros and lambdas. 2025-08-30 01:00:24 +02:00
Christoffer Lerno
cb17cfff7d Deprecation of @assignable_to 2025-08-26 13:21:42 +02:00
Christoffer Lerno
9bf933ae31 - has_tagof on tagged lambdas returns false #2432 2025-08-23 23:41:32 +02:00
Christoffer Lerno
961aa0ef61 Struct and typedef subtypes inherit dynamic functions. 2025-08-23 22:31:29 +02:00
Christoffer Lerno
643aa47e99 Compiler segfault with struct containing list of structs with an inline member #2416 2025-08-18 12:19:14 +02:00
Christoffer Lerno
29bae1fbd6 Updated like the PR #2375 2025-08-06 11:28:36 +02:00
Christoffer Lerno
9c770f360e Formatter did not properly handle "null" for any, and null for empty faults. #2375 2025-08-06 11:23:56 +02:00
Christoffer Lerno
869bcf8b2b Removing use of $assignable and deprecate it. Fix regression for stacktraces on MacOS. Added readline_to_stream. Regression: Chaining an optional together with contracts could in some cases lose the optional. 2025-07-21 03:20:40 +02:00
Christoffer Lerno
4cfa5441d2 Additional fixes on $define 2025-06-06 15:38:46 +02:00
Christoffer Lerno
b893697a87 Various fixes for $defined 2025-06-06 14:41:20 +02:00
Christoffer Lerno
abe4727c3a Deprecate uXX and iXX bit suffixes.
Add experimental LL / ULL suffixes for int128 and uint128 literals.
2025-05-13 23:48:59 +02:00
Christoffer Lerno
946c167bf1 Improve error for default args #2096. Deprecated old inference with slice copy. Copying must now ensure a slicing operator at the end of the right hand side: foo[1..2] = bar[..] rather than the old foo[1..2] = bar. The old behaviour can be mostly retained with --use-old-slice-copy). 2025-04-18 17:19:04 +02:00
Christoffer Lerno
3888fcb182 - Add @operator_r and @operator_s attributes. 2025-04-13 13:43:03 +02:00
Christoffer Lerno
0f2d425297 Operator overloading for + - * / % & | ^ << >> ~ == != 2025-04-11 18:46:22 +02:00
Christoffer Lerno
8cce7f6836 Incorrect rounding at compile time going from double to int. 2025-04-07 02:36:04 +02:00
Christoffer Lerno
82f1b543ed &self not runtime null-checked in macro #1827. Regression in temp allocators. 2025-03-23 22:50:09 +01:00
Christoffer Lerno
5c77c9a754 - Change distinct -> typedef.
- Order of attribute declaration is changed for `alias`.
- Added `LANGUAGE_DEV_VERSION` env constant.
- Rename `anyfault` -> `fault`.
- Changed `fault` -> `faultdef`.
- Added `attrdef` instead of `alias` for attribute aliases.
2025-03-15 20:10:47 +01:00
Christoffer Lerno
8b49e6c14d Rename def to alias. 2025-03-13 11:22:27 +01:00
Christoffer Lerno
25bccf4883 New faults and syntax (#2034)
- Remove `[?]` syntax.
- Change `int!` to `int?` syntax.
- New `fault` declarations.
- Enum associated values can reference the calling enum.
2025-03-10 00:11:35 +01:00
Christoffer Lerno
2439405e70 - $foreach "()" replaced by trailing ":" $foreach ($x, $y : $foo) -> $foreach $x, $y : $foo:
- `$for` "()" replaced by trailing ":" `$for (var $x = 0; $x < FOO; $x++)` -> `$for var $x = 0; $x < FOO; $x++:`
- `$switch` "()" replaced by trailing ":" `$switch ($Type)` -> `$switch $Type:`
- Empty `$switch` requires trailing ":" `$switch` -> `$switch:`
2025-03-04 16:13:47 +01:00
Zack Puhl
177df6321a add test file for wide string constants
add full UTF-8 to wide-str language capabilities
move wstr language constant expressions to builtins and adjust test cases
2025-03-04 13:46:59 +01:00
Christoffer Lerno
0ef99c23a8 Allow swizzling assign, eg. abc.xz += { 5, 10 }; 2025-03-04 02:18:24 +01:00
Christoffer Lerno
0925010c07 Removal of any-switches 2025-03-03 15:02:25 +01:00
Christoffer Lerno
910fc6e364 Post and pre-decrement operators switched places for vector elements. #2010. 2025-03-03 01:21:01 +01:00
Christoffer Lerno
2a895ec7be First 0.7 update, removing all deprecated features. 2025-03-03 00:32:20 +01:00
Christoffer Lerno
cbacd64987 Update tests to (Foo) { ... } syntax. 2025-02-18 18:53:30 +01:00
Christoffer Lerno
168c11e006 {| |} expression blocks deprecated. 2025-02-18 12:50:34 +01:00
Christoffer Lerno
ba48627ca0 Fix address out of bounds access in test. 2025-02-11 00:22:01 +01:00
Christoffer Lerno
63f619e5b6 Add tracking allocator to test runner. #1809 2025-02-09 03:10:35 +01:00
Aleksandr Vedeneev
3a502feb1d test::eq/ne/gt syntax (#1928)
* test::eq/ne/gt syntax

* renamed @almost to test::eq_approx
2025-02-05 22:50:25 +01:00
Christoffer Lerno
3c50376175 New test runner 2025-01-30 01:09:48 +01:00
Christoffer Lerno
e40bab2d30 Allow (int[*]) { 1, 2 } cast style initialization. Experimental change from [*] to [?]. Fix issue where compile time declarations in expression list would not be handled properly. 2025-01-25 22:10:12 +01:00
Christoffer Lerno
b941f93416 Deprecate old void! @benchmark and @test functions. 2025-01-09 20:33:53 +01:00
Christoffer Lerno
07c59e6a6c Fix +a = 1 erronously being accepted. Refactorings. 2025-01-05 02:24:11 +01:00
Christoffer Lerno
9957ab259c Fix vector float -> bool conversion. 2025-01-04 23:16:34 +01: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
f66f324e0e Suppor slicing of bytes. 2024-09-21 22:56:27 +02:00
Christoffer Lerno
885acdac24 Support compile time slicing of untyped lists. 2024-09-21 20:20:56 +02:00
Christoffer Lerno
ac479c7e40 llvm issue with try when bool is combined #1467 2024-09-20 20:15:44 +02:00