Commit Graph

1078 Commits

Author SHA1 Message Date
smoke-y
906eddd1d4 formatting 2025-09-05 21:28:00 +05:30
smoke-y
5161731ce0 proc at type lvl seg fault 2025-09-05 11:27:28 +05:30
A1029384756
3074146784 skip errors on polymorphic procs when in a proc group with other options 2025-08-28 11:30:47 -04:00
gingerBill
409e397566 Fix bug with $fn: proc() when passed with a global variable 2025-08-18 21:47:09 +01:00
gingerBill
8df69c95c3 Add -integer-division-by-zero:all-bits 2025-08-10 18:29:08 +01:00
gingerBill
1524b40bc9 Merge pull request #5556 from odin-lang/bill/division-by-zero
Define Integer Division By Zero
2025-08-10 14:48:33 +01:00
gingerBill
a0ff05e633 Merge pull request #5558 from odin-lang/bill/init-fini-changes
`@(init)` & `@(finit)` Changes.
2025-08-10 12:47:15 +01:00
janga-perlind
5db6ea8354 Do not check for explicit allocators when determining proc in proc group 2025-08-09 12:37:15 +10:00
gingerBill
786d454443 Merge pull request #5559 from Creativty/variable_dereference_suggestion
Improve dereference missing suggestion message
2025-08-08 15:34:45 +01:00
xenobas
443dd566e3 Add a better suggestion for cases that don't need ^ operator 2025-08-08 14:40:43 +01:00
gingerBill
06e48099ca Improve error message 2025-08-08 12:23:22 +01:00
gingerBill
ee01643229 Add -integer-division-by-zero:self 2025-08-08 10:41:05 +01:00
gingerBill
991883d0e1 Add #+feature integer-division-by-zero:<string> 2025-08-08 10:24:44 +01:00
gingerBill
e4a0228a80 Define the behaviour of integer division by zero 2025-08-08 10:00:11 +01:00
gingerBill
eae43f1225 Merge branch 'master' into bill/utf16-strings 2025-08-05 15:07:06 +01:00
gingerBill
c910b5e583 Add intrinsics.type_is_nearly_simple_compare 2025-08-04 12:13:30 +01:00
gingerBill
bb4bc316a4 for in string16; Support string16 across core 2025-08-02 12:20:35 +01:00
gingerBill
ae02d3d02d Begin supporting string16 across the core library 2025-08-02 11:55:16 +01:00
gingerBill
2561427dd3 Add string16 and cstring16 (UTF-16 based strings) 2025-08-02 11:00:15 +01:00
gingerBill
7057fc8dfc Remove the semantics of #no_copy, keep the grammar 2025-07-30 23:14:29 +01:00
Paul-Andre Henegar
93a39affd1 Fix issue 5474
The fix was adding `is_constant = false;`

I also removed the unnecessary check regarding the first element of the
BitSet, since it's checked inside the loop, and also fixed a typo in the
message.
2025-07-28 01:42:19 -04:00
gingerBill
513e6daace Merge pull request #5081 from Lperlind/vet-explicit-allocators
Add -vet-explicit-allocators
2025-07-22 11:06:12 +01:00
Hayden Gray
f72b2b1530 [source-code-locations] - added options to show, obfuscate, and hide source code locations (#5412) 2025-06-26 22:43:44 +02:00
Laytan Laats
2c308bdcfa fix load type panic because front-end allows a deref of a type
Fixes #5357
2025-06-26 17:07:06 +02:00
Airtz
2259db9a53 Better error messages 2025-06-24 02:54:14 +02:00
Airtz
d65b1d5e94 Better proc groups inference 2025-06-23 18:10:40 +02:00
Airtz
38187ef206 Merge branch 'odin-lang:master' into fix-4445 2025-06-22 17:05:32 +02:00
Jeroen van Rijn
56d9671f63 Merge pull request #5368 from Airtz/master
Fix #5331 and `check_shift` improvements
2025-06-22 16:58:21 +02:00
Airtz
277130111e sign check error message update 2025-06-22 16:51:44 +02:00
Airtz
19c0f43e19 Fix #4445 2025-06-22 16:15:22 +02:00
Jeroen van Rijn
7abd86c211 Clarify --- for global variable. 2025-06-21 00:05:15 +02:00
Airtz
7c5b5618e8 check_is_expressible instead of convert_to_typed when there is no type_hint 2025-06-20 04:49:39 +02:00
Airtz
c7c5258c58 Update check_expr.cpp 2025-06-20 01:23:40 +02:00
Feoramund
5ed2735658 Guard against invalid proc types in parameter list
Fixes #4362
2025-06-10 06:13:14 -04:00
gingerBill
6804f4c471 Add support for #soa[N]T compound literals 2025-06-04 13:56:46 +01:00
Jeroen van Rijn
dd27049e13 Merge pull request #5261 from spiel0meister/master
add a missing nullptr check
2025-06-03 15:39:09 +02:00
Jeroen van Rijn
fcf0d4efa1 Merge pull request #5264 from LeandroLibanio28H/5243-fix-scope-attribute-proc-grouping
Fix scope attribute proc grouping (#5243 )
2025-06-03 14:49:40 +02:00
spiel0meister
d1fcec63cc early return; fix indentation 2025-06-03 14:46:44 +02:00
Leandro Libanio
0f5e30783c Update check_expr.cpp
Removing iostream
2025-06-03 08:55:38 -03:00
Jeroen van Rijn
82dfb43663 Fix #5265 2025-06-03 11:18:11 +02:00
LeandroLibanio28H
e6b086e78d Removing unreacheable block (since e86fde3) 2025-06-02 20:48:25 -03:00
LeandroLibanio28H
7b612a3a15 Checking if entity is exported before checking if it's a procedure group 2025-06-02 20:14:19 -03:00
spiel0meister
648fa9e54a check if expr is null 2025-06-02 23:24:46 +02:00
Feoramund
57019f199c Add suggestions for quaternionN or complexN conversions
Quaternions and complex numbers are constructed with `quaternion` and
`complex`, but their types are of the `*N` form.

These suggestions should point the user in the right direction.
2025-05-31 07:09:29 -04:00
gingerBill
594f1b30b4 Add Suggestion: 'context = runtime.default_context()' 2025-05-24 14:18:16 +01:00
Jeroen van Rijn
95183e4b9c Remove now unnecessary checks. 2025-05-21 19:37:09 +02:00
Jeroen van Rijn
96fd07e0ee Fix #5177 - Tweak error messages. 2025-05-21 19:20:58 +02:00
Jeroen van Rijn
ab95932502 -dynamic-literals 2025-05-19 20:44:27 +02:00
bogwi
af6b763449 CHECK 3 done
Enhance support for polymorphic procedures in type checking

1. In src/check_type.cpp, added special handling for polymorphic procedures used as default parameter values. We now allow a polymorphic procedure to be used as a default parameter value, even when its type parameters can't be immediately determined.

2. In src/check_expr.cpp, we modified the check_is_assignable_to_with_score function to handle the special case of assigning a polymorphic procedure as a default parameter. The function now allows a polymorphic procedure to be assigned to a concrete procedure type in this specific context.
2025-05-05 17:53:32 +09:00
Jeroen van Rijn
c96d8237ba Clarify error messages for types that aren't simply comparable.
Previously, it implied that these are different types:
```
W:/Scratch/scratch.odin(17:5) Error: Cannot compare expression, operator '==' not defined between the types 'Handle_Map($T=u32, $HT=u32, $Max=10000)' and 'Handle_Map($T=u32, $HT=u32, $Max=10000)'
    if m == {} {
       ^~~~~~^
```
Now:
```
W:/Scratch/scratch.odin(20:5) Error: Cannot compare expression. Type 'Handle_Map($T=u32, $HT=u32, $Max=10000)' is not simply comparable, so operator '==' is not defined for it.
	if m == {} {
	   ^~~~~~^
```
2025-05-03 22:31:01 +02:00