Commit Graph

1200 Commits

Author SHA1 Message Date
gingerBill
3a5439f60e Compiler: Improve error propagation when all of the overloads have the same return values 2026-06-16 15:26:01 +01:00
gingerBill
ee5d5d6882 Remove the now defunct __write_bits and __read_bits 2026-06-15 16:57:27 +01:00
gingerBill
2cf2a1341b Minimize error propagation of map[key] indexing 2026-06-14 18:55:26 +01:00
gingerBill
4b482366c1 Support constant compound literals 2026-06-14 15:51:27 +01:00
gingerBill
dd4044dd1c Merge branch 'master' of https://github.com/odin-lang/Odin 2026-06-05 14:13:18 +01:00
gingerBill
f14071bd14 Fix transmute corrupting a compile time constant 2026-06-05 14:13:08 +01:00
gingerBill
1c9fa5d0b7 Merge pull request #6731 from odin-lang/bill/expand-values-operator
Support `**` as `expand_values` operator: `**x` == `expand_values(x)`
2026-06-05 11:42:08 +01:00
A1029384756
f735e794a6 [checker] disallow * and / for bit sets 2026-06-04 16:12:35 -04:00
jakubtomsu
46bb13d0bd check operand type in any_int params 2026-05-27 19:10:34 +02:00
gingerBill
fb8a9d0839 Support ** as expand_values operator: **x == expand_values(x) 2026-05-25 10:28:15 +01:00
gingerBill
2094cd4768 Add suggestion for ternary if with simd 2026-05-19 15:27:34 +01:00
gingerBill
cfef365c9f Add another suggestion of #simd shifting 2026-05-19 14:53:50 +01:00
gingerBill
0a87628a76 Add suggestion when trying to use << and >> with #simd 2026-05-19 14:52:46 +01:00
gingerBill
f370632888 Add suggestion when trying to index a #simd array 2026-05-19 14:47:06 +01:00
gingerBill
9501894e80 Merge pull request #6701 from Creativty/fix_poly_proc_nil
Fix nil typing when procedure call argument
2026-05-18 15:00:18 +01:00
Abderrahim Indjaren
d02c5e1a21 add: check duplicates in type switches 2026-05-18 03:15:55 +01:00
Abderrahim Indjaren
d37284ce55 fix: nil keeps its type instead of taking expected type 2026-05-17 18:49:49 +01:00
gingerBill
3715544202 Merge pull request #6670 from Creativty/fix_dynamic_cap_doc
Handle Fixed Capacity Dynamic Arrays in write_expr_to_string
2026-05-12 14:29:09 +01:00
Abderrahim Indjaren
7954e3bdbe add: cap dynamic array is now handled in write_expr_to_string 2026-05-10 15:48:32 +01:00
gingerBill
daa6bb1aee Fix check_multi_expr_with_type_hint to use return rather than break 2026-05-08 14:34:44 +01:00
gingerBill
ea5175d865 Support s: [2]u16 = "hi" 2026-05-02 12:11:39 +01:00
Franz Hoeltermann
0199c96f47 Fix type info not being generated for types only used in []typeid literals 2026-04-28 17:04:52 +02:00
gingerBill
31184535a0 Merge pull request #6605 from odin-lang/bill/array-cast
Native Array Casting Semantics
2026-04-28 11:07:31 +01:00
gingerBill
a40f275b0c Check to see if a normal type is being used in a typeid context 2026-04-27 09:23:04 +01:00
gingerBill
a44b8b0af0 Support ([N]T)([N]U{...}) 2026-04-23 10:42:53 +01:00
gingerBill
01734dfa9b Merge pull request #6599 from 3rd-Party-Guy/issue/6594-self-ref-global-init
Fixes #6594
2026-04-22 13:44:08 +01:00
Nikolay Hadzhiev
48e83ad003 gh 6594
prevent compiler crash from self-referential global initialisation
2026-04-22 13:14:08 +02:00
gingerBill
608709693b Fix #6590 2026-04-22 11:32:58 +01:00
gingerBill
ef275c5c0e Support []int{multiple_returns(), 123} 2026-04-21 17:45:36 +01:00
gingerBill
b1e8ec5e64 Allow for Some_Struct{multiple_return_value(), 123} 2026-04-21 17:17:59 +01:00
gingerBill
92c17b85e1 Allow assigning subtypes to unions 2026-04-21 16:35:57 +01:00
Weixie Cui
4e87f47fe3 Fix >= comparison runtime dependencies for string and cstring types
Token_GtEq incorrectly added *_gt runtime symbols for cstring, cstring16,
string16, and string comparisons; use the correct *_ge dependencies instead.
2026-03-26 18:21:27 +08:00
gingerBill
0fce2da442 Add suggestion when trying to slice an enumerated array 2026-03-25 15:03:37 +00:00
gingerBill
e10257f86a Fix slicing logic of a FCD array to check if it can be sliced or not 2026-03-25 14:11:22 +00:00
gingerBill
59eaa13625 Fix indexing logic of FCD arrays 2026-03-25 14:10:08 +00:00
gingerBill
a9e81e01aa Allow addressing of an index expression of an soa slice/dynamic array 2026-03-25 14:08:39 +00:00
gingerBill
85eeca2f03 Add missing generic #soa pointers to parapoly handling system 2026-03-25 10:15:58 +00:00
Harold Brenes
4f6caf19f0 Ensure checking for proc property equality before checking param assignability 2026-03-23 21:15:12 -04:00
Harold Brenes
147542b5cc Allow pointers to types which have subtype fields at offset 0
to be assignable in proc parameters.

```odin
// Virtual interface
IFoo :: struct {
	foo: proc( self: ^IFoo ),
}

// Implements IFoo interface
Foo :: struct {
	using vt: IFoo,
	name: string,
}

// Implement interface via `Foo`
Foo_Impl :: IFoo {
	// `self` of type `^Foo` (not `^IFoo`) is now accepted as a valid parameter.
	foo = proc( self: ^Foo ) {
		...
	},
}
```
2026-03-23 20:55:44 -04:00
gingerBill
85c05b238e Handle bit fields separately 2026-03-17 13:50:49 +00:00
gingerBill
d28e19c957 Minor improve to check if the entity was already there 2026-03-17 13:47:02 +00:00
gingerBill
153a522228 Use normal i64 arithmetic instead of big-ints for hot path 2026-03-17 13:34:06 +00:00
gingerBill
46936e0e52 General improvements 2026-03-17 12:55:25 +00:00
gingerBill
e18b15e8f0 Move error-only things to the error scopes 2026-03-17 12:16:44 +00:00
gingerBill
b19e89578f Improve check_struct_fields performance; use CheckerTypePath free list 2026-03-17 11:42:03 +00:00
gingerBill
04cb889aed Begin interning ScopeMap strings 2026-03-17 11:04:32 +00:00
gingerBill
36d5a19115 Replace Scope.elements to use a custom hash map ScopeMap
This hash map is robin hood based with a inline slot amount for small scopes
2026-03-16 17:41:58 +00:00
gingerBill
1744f57d01 Use permanent_alloc_item directly rather than through the gb_alloc_item generic interface 2026-03-16 16:03:27 +00:00
gingerBill
0314c91a64 Add error message for foo := Foo{&foo} where the type of foo is not determined yet 2026-03-15 16:16:46 +00:00
gingerBill
c6772dfd06 Merge branch 'master' into bill/fixed-capacity-dynamic-array 2026-03-15 11:41:01 +00:00