aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [source-code-locations] - added options to show, obfuscate, and hide source ↵Hayden Gray2025-06-261-4/+42
| | | | code locations (#5412)
* fix load type panic because front-end allows a deref of a typeLaytan Laats2025-06-261-0/+7
| | | | Fixes #5357
* Better error messagesAirtz2025-06-241-7/+7
|
* Better proc groups inferenceAirtz2025-06-231-25/+39
|
* Merge branch 'odin-lang:master' into fix-4445Airtz2025-06-221-82/+62
|\
| * Merge pull request #5368 from Airtz/masterJeroen van Rijn2025-06-221-82/+62
| |\ | | | | | | Fix #5331 and `check_shift` improvements
| | * sign check error message updateAirtz2025-06-221-1/+1
| | |
| | * `check_is_expressible` instead of `convert_to_typed` when there is no ↵Airtz2025-06-201-3/+2
| | | | | | | | | | | | `type_hint`
| | * Update check_expr.cppAirtz2025-06-201-82/+63
| | |
* | | Fix #4445Airtz2025-06-221-19/+26
|/ /
* / Clarify --- for global variable.Jeroen van Rijn2025-06-211-1/+1
|/
* Guard against invalid proc types in parameter listFeoramund2025-06-101-1/+4
| | | | Fixes #4362
* Add support for `#soa[N]T` compound literalsgingerBill2025-06-041-77/+107
|
* Merge pull request #5261 from spiel0meister/masterJeroen van Rijn2025-06-031-0/+3
|\ | | | | add a missing nullptr check
| * early return; fix indentationspiel0meister2025-06-031-7/+8
| |
| * check if expr is nullspiel0meister2025-06-021-5/+7
| |
* | Merge pull request #5264 from ↵Jeroen van Rijn2025-06-031-37/+6
|\ \ | | | | | | | | | | | | LeandroLibanio28H/5243-fix-scope-attribute-proc-grouping Fix scope attribute proc grouping (#5243 )
| * | Update check_expr.cppLeandro Libanio2025-06-031-2/+0
| | | | | | | | | Removing iostream
| * | Removing unreacheable block (since e86fde3)LeandroLibanio28H2025-06-021-31/+0
| | |
| * | Checking if entity is exported before checking if it's a procedure groupLeandroLibanio28H2025-06-021-10/+12
| |/
* / Fix #5265Jeroen van Rijn2025-06-031-52/+57
|/
* Add suggestions for `quaternionN` or `complexN` conversionsFeoramund2025-05-311-1/+21
| | | | | | | 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.
* Add `Suggestion: 'context = runtime.default_context()'`gingerBill2025-05-241-0/+2
|
* Remove now unnecessary checks.Jeroen van Rijn2025-05-211-6/+2
|
* Fix #5177 - Tweak error messages.Jeroen van Rijn2025-05-211-0/+10
|
* -dynamic-literalsJeroen van Rijn2025-05-191-1/+1
|
* CHECK 3 donebogwi2025-05-051-9/+29
| | | | | | | | 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.
* Clarify error messages for types that aren't simply comparable.Jeroen van Rijn2025-05-031-5/+16
| | | | | | | | | | | | | | | 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 == {} { ^~~~~~^ ```
* Fix #5107Jeroen van Rijn2025-05-031-1/+1
| | | | Fixes #5107 by checking whether `result_count` is non-zero before indexing `type->Proc.results->Tuple.variables`.
* fixes assigning null as a type if it's an alias but the base type isn't ↵Laytan Laats2025-04-301-1/+4
| | | | | | | | | | | resolved yet It's a bit of a band aid fix because the field will get the type of the alias, not the base type, but that was already the case before #5045 so it's forward progression. Closes #5092 Fixes #5061
* All N-valued (N>=2) expressions in `or_else` expressionsgingerBill2025-04-291-1/+13
|
* Improve `or_else` type inference logicgingerBill2025-03-271-6/+7
|
* Fix #3955gingerBill2025-03-071-0/+5
|
* Fix #4244gingerBill2025-03-071-2/+1
|
* Fix #4909gingerBill2025-03-061-0/+5
|
* Fixed `~` on `bit_set[Some_Enum]` altering the definition of the enum.Barinzaya2025-03-021-3/+2
| | | | | This was occurring for enums whose minimum values were greater than zero.
* Allow indirection for swizzling on procedure parametersgingerBill2025-02-211-0/+5
|
* Work on making name mangling deterministicgingerBill2025-02-171-1/+1
|
* Remove transmute suggestion with `-vet-cast` when transmuting native <-> ↵gingerBill2025-02-051-1/+2
| | | | endian-specific types
* Fix #4750gingerBill2025-01-311-1/+3
|
* fix inverted error messagesDavid Rubin2025-01-181-4/+4
|
* Error if -no-thread-local is used in presence of -no-crt on Unixflysand72025-01-171-13/+0
|
* Added compile-time checks for thread locals with -no-crtflysand72025-01-171-1/+14
| | | | | | | | Now using any thread-local variables with -no-crt enabled will cause a compiler error, unless -no-thread-local is given. Also fixed a minor typo in a comment.
* Merge pull request #4601 from Barinzaya/simd_vector_broadcastinggingerBill2025-01-061-0/+20
|\ | | | | Implicit broadcasting for SIMD arrays
| * Added some implicit broadcasting for #simd arrays.Barinzaya2024-12-191-0/+20
| | | | | | | | | | | | This covers broadcasting from untyped numbers when assigning, as well as when performing binary operations. SIMD intrinsics have not been adjusted
* | Make `-no-dynamic-literals` the default nowgingerBill2025-01-051-16/+21
| |
* | Add `#+feature dynamic-literals`gingerBill2025-01-051-2/+8
| |
* | Add `#branch_location`gingerBill2025-01-011-0/+12
|/
* Fix #4535gingerBill2024-12-021-1/+5
|
* Fix assert when return value expected.Jeroen van Rijn2024-11-281-2/+2
|