summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_analyzer.cpp
AgeCommit message (Collapse)Author
2023-02-26GDScript: Fix wrong unsafety mark for binary operatorDmitrii Maganov
2023-02-24GDScript: Fix range regressionDmitrii Maganov
2023-02-23GDScript: Fix usage of enum value as range argumentDmitrii Maganov
2023-02-21GDScript: Fix error message for unfound typeDmitrii Maganov
2023-02-21Merge pull request #73693 from vnen/gdscript-fix-script-signature-checkRémi Verschelde
GDScript: Fix override signature check of script inheritance
2023-02-21GDScript: Fix override signature check of script inheritanceGeorge Marques
Avoid treating the super class as a meta type for signature check, since it is looking at the instance level for that.
2023-02-21GDScript: Fix crash when autoload script can't be foundGeorge Marques
2023-02-20Merge pull request #73590 from vnen/gdscript-global-scope-enumsRémi Verschelde
Make global scope enums accessible as types in GDScript
2023-02-20Merge pull request #73489 from vonagam/type-check-nodeRémi Verschelde
GDScript: Rework type check
2023-02-20Merge pull request #73291 from vonagam/fix-unsafe-weak-binopRémi Verschelde
GDScript: Fix missing unsafety mark for binary op with weak variables
2023-02-19Make global scope enums accessible as types in GDScriptGeorge Marques
Add functions to CoreConstant so enums can be properly deduced. Also add the enums in release builds to make consistent with ClassDB enums and avoid differences in script compilation between debug and release.
2023-02-17GDScript: Rework type checkDmitrii Maganov
2023-02-17Merge pull request #72925 from vonagam/fix-enum-typed-array-errorYuri Sizov
GDScript: Fix error about enum typed arrays
2023-02-16GDScript: Fix infer on read-only propertyDmitrii Maganov
2023-02-14GDScript: Fix default value of exported enum variableDanil Alexeev
2023-02-14GDScript: Fix missing unsafety mark for binary op with weak variablesDmitrii Maganov
2023-02-10Clean up ProjectConverter3To4 architecture, move renames map to separate fileRémi Verschelde
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.
2023-02-09GDScript: Fix error about enum typed arraysDmitrii Maganov
2023-02-07Some code simplificationsMarkus Sauermann
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`
2023-02-06GDScript: Fix `await` type inferenceDanil Alexeev
2023-02-06Merge pull request #72512 from vonagam/fix-ternary-type-sourceYuri Sizov
GDScript: Fix type certainty for result of ternary operator
2023-02-05Merge pull request #72608 from vnen/gdscript-warning-default-errorYuri Sizov
GDScript: Add warnings that are set to error by default (take 2)
2023-02-02GDScript: Add warnings that are set to error by defaultGeorge Marques
- 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.
2023-02-02GDScript: Improve usability of setter chainsGeorge Marques
- 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.
2023-02-02GDScript: Fix getting reduced value of incomplete subscriptDmitrii Maganov
2023-02-01GDScript: Fix type certainty for result of ternary operatorDmitrii Maganov
2023-02-01Revert "GDScript: Add warnings that are set to error by default"Rémi Verschelde
This reverts commit a166833bfa23a21a7bff196a85a20b014e7c1396. This caused multiple regressions. Needs to be redone with more testing before merge. Fixes #72501.
2023-02-01GDScript: Add warnings that are set to error by defaultGeorge Marques
- 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.
2023-01-31Merge pull request #72454 from dalexeev/gds-fix-icon-annotationRémi Verschelde
GDScript: Fix `@icon` annotation
2023-01-31Merge pull request #72206 from vnen/gdscript-allow-void-return-shorthandRémi Verschelde
GDScript: Allow void functions to return calls to other void functions
2023-01-31Merge pull request #57520 from jordigcs/gd-rename-mapRémi Verschelde
Add hint for identifiers renamed from 3.x to 4.0
2023-01-31GDScript: Fix `@icon` annotationDanil Alexeev
2023-01-31GDScript: Allow void functions to return calls to other void functionsGeorge Marques
2023-01-31GDScript: Fix issues with typed arraysDmitrii Maganov
2023-01-30Merge pull request #72175 from dalexeev/gds-fix-export-group-annotationsRémi Verschelde
GDScript: Fix broken export group annotations
2023-01-29Merge pull request #72285 from vnen/gdscript-variable-matchRémi Verschelde
GDScript: Allow variables in match patterns
2023-01-29Merge pull request #71844 from vonagam/fix-constant-conversionsRémi Verschelde
GDScript: Fix constant conversions
2023-01-28GDScript: Allow variables in match patternsGeorge Marques
To restore an ability available in 3.x and reduce compatibility changes.
2023-01-29GDScript: Fix constant conversionsDmitrii Maganov
2023-01-28GDScript: Fix implicit conversions for function returnsDmitrii Maganov
2023-01-28Merge pull request #69163 from vonagam/variant-safe-linesRémi Verschelde
GDScript: Fix wrong marking of some lines related to Variant as unsafe
2023-01-27GDScript: Fix broken export group annotationsDanil Alexeev
2023-01-27GDScript: Fix test for read-only state of constantsDmitrii Maganov
2023-01-26Merge pull request #71634 from dalexeev/gds-annotations-analyzerRémi Verschelde
GDScript: Allow constant expressions in annotations
2023-01-26Merge pull request #72008 from vonagam/fix-property-access-unsafe-markRémi Verschelde
GDScript: Fix marking of line with unsafe property access as unsafe
2023-01-25GDScript: Allow constant expressions in annotationsDanil Alexeev
2023-01-25Merge pull request #71120 from jordigcs/ternaryGeorge Marques
Closes https://github.com/godotengine/godot/issues/71065
2023-01-25Merge pull request #71349 from vonagam/disallow-infer-on-weakRémi Verschelde
GDScript: Disallow type inference with untyped initializer
2023-01-25GDScript: Fix marking of line with unsafe property access as unsafeDmitrii Maganov
2023-01-24Add hint for identifiers renamed since Godot 3jordi