summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_analyzer.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge pull request #72925 from vonagam/fix-enum-typed-array-errorYuri Sizov2023-02-171-10/+14
|\ \ | | | | | | GDScript: Fix error about enum typed arrays
| * | GDScript: Fix error about enum typed arraysDmitrii Maganov2023-02-091-10/+14
| | |
* | | GDScript: Fix infer on read-only propertyDmitrii Maganov2023-02-161-0/+1
| | |
* | | GDScript: Fix default value of exported enum variableDanil Alexeev2023-02-141-5/+9
| |/ |/|
* | Clean up ProjectConverter3To4 architecture, move renames map to separate fileRémi Verschelde2023-02-101-37/+24
|/ | | | | | | | | | | This allows properly limiting what features depend on the RegEx module (doing the actual conversion) and what features only require the renames data (GDScript suggestions). Also better excludes the conversion command line options when actually disabling deprecated code. Fixes #73029.
* Some code simplificationsMarkus Sauermann2023-02-071-4/+1
| | | | | | | | | 1. `number_width` isn't used later 2. `return_type` is used only once 3. AudioServer::get_singleton()->get_channel_count() always returns a channel_count of 1 or larger 4. negative `aa->backward` conditional 5. `current_canvas` == `find_world_2d()->get_canvas()` 6. identical if `render_shadows`
* GDScript: Fix `await` type inferenceDanil Alexeev2023-02-061-13/+10
|
* Merge pull request #72512 from vonagam/fix-ternary-type-sourceYuri Sizov2023-02-061-1/+1
|\ | | | | GDScript: Fix type certainty for result of ternary operator
| * GDScript: Fix type certainty for result of ternary operatorDmitrii Maganov2023-02-011-1/+1
| |
* | Merge pull request #72608 from vnen/gdscript-warning-default-errorYuri Sizov2023-02-051-30/+150
|\ \ | | | | | | GDScript: Add warnings that are set to error by default (take 2)
| * | GDScript: Add warnings that are set to error by defaultGeorge Marques2023-02-021-30/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Adds a list of default levels for all warning so they can be set individually. - Add warnings set by default to error for: - Using `get_node()` without `@onready`. - Using `@onready` together with `@export`. - Inferring a static type with a Variant value. - Overriding a native engine method. - Adjust how annotations to ignore warnings are treated so they also apply to method parameters. - Clean up a bit how ignored warnings are set. There were two sets but only one was actually being used. - Set all warnings to the `WARN` level for tests, so they they can be properly tested. - Fix enum types in native methods signatures being set to `int`. - Fix native enums being treated as Dictionary by mistake. - Make name of native enum types use the class they are defined in, not the direct super class of the script. This ensures they are always equal even when coming from different sources. - Fix error for signature mismatch that was only showing the first default argument as having a default. Now it shows for all.
* | | GDScript: Improve usability of setter chainsGeorge Marques2023-02-021-2/+26
|/ / | | | | | | | | | | | | | | | | - Consider PackedArrays non-shared since they are copied on C++/script boundaries. - Add error messages in the analyzer when assigning to read-only properties. - Add specific error message at runtime when assignment fails because the property is read-only.
* / GDScript: Fix getting reduced value of incomplete subscriptDmitrii Maganov2023-02-021-0/+8
|/
* Revert "GDScript: Add warnings that are set to error by default"Rémi Verschelde2023-02-011-143/+30
| | | | | | | | | This reverts commit a166833bfa23a21a7bff196a85a20b014e7c1396. This caused multiple regressions. Needs to be redone with more testing before merge. Fixes #72501.
* GDScript: Add warnings that are set to error by defaultGeorge Marques2023-02-011-30/+143
| | | | | | | | | | | | | | | | | | | | | | | - Adds a list of default levels for all warning so they can be set individually. - Add warnings set by default to error for: - Using `get_node()` without `@onready`. - Using `@onready` together with `@export`. - Inferring a static type with a Variant value. - Overriding a native engine method. - Adjust how annotations to ignore warnings are treated so they also apply to method parameters. - Clean up a bit how ignored warnings are set. There were two sets but only one was actually being used. - Set all warnings to the `WARN` level for tests, so they they can be properly tested. - Fix enum types in native methods signatures being set to `int`. - Fix native enums being treated as Dictionary by mistake. - Make name of native enum types use the class they are defined in, not the direct super class of the script. This ensures they are always equal even when coming from different sources. - Fix error for signature mismatch that was only showing the first default argument as having a default. Now it shows for all.
* Merge pull request #72454 from dalexeev/gds-fix-icon-annotationRémi Verschelde2023-01-311-5/+6
|\ | | | | | | GDScript: Fix `@icon` annotation
| * GDScript: Fix `@icon` annotationDanil Alexeev2023-01-311-5/+6
| |
* | Merge pull request #72206 from vnen/gdscript-allow-void-return-shorthandRémi Verschelde2023-01-311-10/+33
|\ \ | | | | | | | | | GDScript: Allow void functions to return calls to other void functions
| * | GDScript: Allow void functions to return calls to other void functionsGeorge Marques2023-01-311-10/+33
| |/
* | Merge pull request #57520 from jordigcs/gd-rename-mapRémi Verschelde2023-01-311-1/+117
|\ \ | |/ |/| | | Add hint for identifiers renamed from 3.x to 4.0
| * Add hint for identifiers renamed since Godot 3jordi2023-01-241-1/+117
| |
* | GDScript: Fix issues with typed arraysDmitrii Maganov2023-01-311-109/+171
| |
* | Merge pull request #72175 from dalexeev/gds-fix-export-group-annotationsRémi Verschelde2023-01-301-1/+5
|\ \ | | | | | | | | | GDScript: Fix broken export group annotations
| * | GDScript: Fix broken export group annotationsDanil Alexeev2023-01-271-1/+5
| | |
* | | Merge pull request #72285 from vnen/gdscript-variable-matchRémi Verschelde2023-01-291-4/+15
|\ \ \ | | | | | | | | GDScript: Allow variables in match patterns
| * | | GDScript: Allow variables in match patternsGeorge Marques2023-01-281-4/+15
| | | | | | | | | | | | | | | | To restore an ability available in 3.x and reduce compatibility changes.
* | | | Merge pull request #71844 from vonagam/fix-constant-conversionsRémi Verschelde2023-01-291-79/+111
|\ \ \ \ | | | | | | | | | | GDScript: Fix constant conversions
| * | | | GDScript: Fix constant conversionsDmitrii Maganov2023-01-291-79/+111
| |/ / /
* / / / GDScript: Fix implicit conversions for function returnsDmitrii Maganov2023-01-281-20/+15
|/ / /
* | | Merge pull request #69163 from vonagam/variant-safe-linesRémi Verschelde2023-01-281-35/+33
|\ \ \ | |/ / |/| | | | | GDScript: Fix wrong marking of some lines related to Variant as unsafe
| * | GDScript: Fix wrong marking of some lines related to Variant as unsafeDmitrii Maganov2023-01-121-35/+33
| | |
* | | GDScript: Fix test for read-only state of constantsDmitrii Maganov2023-01-271-3/+3
| | |
* | | Merge pull request #71634 from dalexeev/gds-annotations-analyzerRémi Verschelde2023-01-261-3/+63
|\ \ \ | | | | | | | | | | | | GDScript: Allow constant expressions in annotations
| * | | GDScript: Allow constant expressions in annotationsDanil Alexeev2023-01-251-3/+63
| | | |
* | | | Merge pull request #72008 from vonagam/fix-property-access-unsafe-markRémi Verschelde2023-01-261-0/+1
|\ \ \ \ | |/ / / |/| | | | | | | GDScript: Fix marking of line with unsafe property access as unsafe
| * | | GDScript: Fix marking of line with unsafe property access as unsafeDmitrii Maganov2023-01-251-0/+1
| | |/ | |/|
* | | Merge pull request #71120 from jordigcs/ternaryGeorge Marques2023-01-251-4/+4
|\ \ \ | | | | | | | | Closes https://github.com/godotengine/godot/issues/71065
| * | | Allow standalone ternary expressionsjordi2023-01-191-4/+4
| | | |
* | | | Merge pull request #71349 from vonagam/disallow-infer-on-weakRémi Verschelde2023-01-251-3/+1
|\ \ \ \ | |_|/ / |/| | | | | | | GDScript: Disallow type inference with untyped initializer
| * | | GDScript: Disallow type inference with untyped initializerDmitrii Maganov2023-01-131-3/+1
| | | |
* | | | Fix unnammed enum crash regressionocean (they/them)2023-01-181-1/+1
| | | |
* | | | Merge pull request #71279 from vonagam/fix-iterator-number-typeRémi Verschelde2023-01-161-12/+43
|\ \ \ \ | | | | | | | | | | GDScript: Fix typing of iterator in for loop
| * | | | GDScript: Fix typing of iterator in for loopDmitrii Maganov2023-01-131-12/+43
| | | | |
* | | | | Fix cyclic reference errors while reducing identifiers.Adam Scott2023-01-151-2/+2
| |/ / / |/| | | | | | | | | | | Co-authored-by: Dmitrii Maganov <vonagam@gmail.com>
* | | | GDScript: Fix infinite recursion in resolution of enum valuesGeorge Marques2023-01-131-2/+2
|/ / /
* | | Merge pull request #70733 from vonagam/fix-assigning-untypedRémi Verschelde2023-01-121-81/+114
|\ \ \ | | | | | | | | | | | | GDScript: Fix some issues with assignments that involve untyped things
| * | | GDScript: Fix some issues with assignments that involve untyped thingsDmitrii Maganov2023-01-121-81/+114
| | |/ | |/|
* / | GDScript: Fix extending abstract classes, forbid their constructionDmitrii Maganov2023-01-121-12/+20
|/ /
* | GDScript: Fix getting type from PropertyInfo for Variant argumentsDmitrii Maganov2023-01-121-10/+7
| |
* | Merge pull request #70987 from vonagam/fix-parameter-conversion-assignGeorge Marques2023-01-121-6/+3
|\ \