aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * | 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
|
* checker: only error with -vet-cast when it is actually castableLaytan Laats2024-11-211-1/+4
|
* Remove `#relative` types from the compilergingerBill2024-11-141-64/+0
|
* Merge pull request #4394 from seventh-chord/errormessagesgingerBill2024-11-061-0/+9
|\ | | | | Suggestion when assigning enum to bit_set
| * Suggestion when assigning enum to bit_setMorten Hauke Solvang2024-10-191-0/+9
| |
* | Fix previous commit for arraysgingerBill2024-11-041-10/+9
| |
* | Fix bug for `foo().bar` where `foo()` is a 0-value expressiongingerBill2024-11-041-12/+16
| |
* | Fix bug caused due to incorrect type checking looking for `context` not ↵gingerBill2024-10-271-0/+1
|/ | | | defined in a context
* Fix #4373gingerBill2024-10-131-2/+8
|
* fix not erroring on invalid ternaryLaytan Laats2024-10-021-5/+0
| | | | | | | For example: `a: f32 = true ? 1 : len` would get to the back-end without errors. Fixes #1690
* Forbid labelled or-branch expressions within `defer`Feoramund2024-09-191-0/+4
|
* add '#caller_expression'Laytan Laats2024-09-141-1/+6
|
* Add `Suggested Example` for using an inline procedure which enables a target ↵gingerBill2024-09-121-0/+3
| | | | feature
* fix reuse of slice for varargs with poly typesLaytan Laats2024-09-121-16/+17
|
* Allow `transmute(Bit_Set)~T(0)`gingerBill2024-09-111-1/+2
|