summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests/scripts/analyzer/errors
Commit message (Collapse)AuthorAgeFilesLines
* Core: Fix built-in enum constant bindingsDanil Alexeev2024-11-226-0/+12
|
* Implement typed dictionariesThaddeus Crews2024-09-0410-0/+30
|
* GDScript: Fix common mismatched external parser errorsrune-scape2024-07-311-1/+1
|
* GDScript: Fix access non-static members in static contextDanil Alexeev2024-05-0114-4/+79
|
* Merge pull request #84043 from dalexeev/gds-fix-unsafe-cast-warningRémi Verschelde2024-04-096-0/+15
|\ | | | | | | GDScript: Fix `UNSAFE_CAST` warning
| * GDScript: Fix `UNSAFE_CAST` warningDanil Alexeev2023-10-276-0/+15
| |
* | Merge pull request #82639 from golfinq/gdscript-improve-indexing-errorRémi Verschelde2024-01-044-4/+4
|\ \ | |/ |/| | | GDScript: Improve error messages for invalid indexing
| * GDScript: Improve error messages for invalid indexingRémi Verschelde2023-10-024-4/+4
| | | | | | | | | | | | | | | | | | These errors are very common when using an invalid property name or calling on an object of the wrong type, and the previous message was a bit cryptic for users. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com> Co-authored-by: golfinq <golfinqz@gmail.com>
* | GDScript: Fix non-static call is allowed in static var lambda bodyDanil Alexeev2023-10-209-1/+67
| |
* | GDScript: Fix incorrect error message for utility functionsDanil Alexeev2023-10-164-0/+8
| |
* | GDScript: Add error when exporting node in non [Node]-derived classesDanil Alexeev2023-10-056-0/+31
|/
* Merge pull request #82477 from dalexeev/gds-covariance-and-contravarianceYuri Sizov2023-09-2814-0/+84
|\ | | | | | | GDScript: Add return type covariance and parameter type contravariance
| * GDScript: Add return type covariance and parameter type contravarianceDanil Alexeev2023-09-2814-0/+84
| |
* | Merge pull request #82030 from dalexeev/gds-make-for-loop-array-literal-typedYuri Sizov2023-09-282-0/+7
|\ \ | | | | | | | | | GDScript: Make array literal typed if `for` loop variable type is specified
| * | GDScript: Make array literal typed if `for` loop variable type is specifiedDanil Alexeev2023-09-212-0/+7
| | |
* | | Merge pull request #80085 from vnen/gdscript-pattern-guardsYuri Sizov2023-09-282-0/+6
|\ \ \ | |_|/ |/| | | | | GDScript: Implement pattern guards for match statement
| * | GDScript: Implement pattern guards for match statementGeorge Marques2023-09-272-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Within a match statement, it is now possible to add guards in each branch: var a = 0 match a: 0 when false: print("does not run") 0 when true: print("but this does") This allows more complex logic for deciding which branch to take.
* | | Merge pull request #75988 from dalexeev/gds-unsafe-call-argumentYuri Sizov2023-09-274-0/+15
|\ \ \ | |/ / |/| | | | | GDScript: Improve call analysis
| * | GDScript: Improve call analysisDanil Alexeev2023-09-214-0/+15
| |/ | | | | | | | | | | * Add missing `UNSAFE_CALL_ARGUMENT` warning. * Fix `Object` constructor. * Display an error for non-existent static methods.
* / GDScript: Prevent constructing and inheriting engine singletonsDanil Alexeev2023-09-224-0/+12
|/
* GDScript: Add check for `super()` methods not being implementedocean (they/them)2023-09-172-0/+7
|
* Fix various typos with codespellRémi Verschelde2023-09-121-2/+2
| | | | Using 2.2.6.dev180+ge3a2cfbd.
* Merge pull request #80964 from dalexeev/gds-allow-use-local-consts-as-typesYuri Sizov2023-08-256-0/+21
|\ | | | | | | GDScript: Allow use local constants as types
| * GDScript: Allow use local constants as typesDanil Alexeev2023-08-256-0/+21
| |
* | GDScript: Fix lambda resolution with cyclic referencesDanil Alexeev2023-08-254-0/+14
|/
* GDScript: Add static typing for `for` loop variableDanil Alexeev2023-08-172-0/+6
|
* GDScript: Check `get_node()` shorthand in static functionsDanil Alexeev2023-08-092-0/+11
|
* GDScript: Fix bug with identifier shadowed below in current scopeDanil Alexeev2023-07-262-0/+6
|
* Change GDScript tests to use InstancePlaceholder as the example abstractAaron Franke2023-07-154-4/+4
|
* GDScript: fix regression when checking for virtual function implementation.ocean (they/them)2023-06-214-11/+0
| | | | | | | | | | | | Unfortunately it appears the virtual function checks in #77324 are not trustworthy at runtime, because objects can have scripts attached, but this information is not always available at compile-time. These checks need to be removed. The rest of the PR is still useful, making all method flags available to the analyzer, so a full revert isn't necessary/desirable. This reopens #76938, which will need another solution.
* GDScript: Fix some bugs with static variables and functionsDanil Alexeev2023-06-162-0/+10
|
* GDScript: add errors when calling unimplemented virtual functionsocean (they/them)2023-06-154-0/+11
| | | | | | | | | | | | This PR does a small refactor of how method flags are handled in the GDScript analyzer. This way, it adds support for the analyzer to use any of MethodInfo's flags, where previously it could only use METHOD_FLAG_STATIC and METHOD_FLAG_VARARG. As a side-effect, this also normalizes behavior between editor and release templates, which fixes #76938. The tests added also brought a different issue to light, where using `super()` appears to generate a return variable discarded on calling super's _init(), which doesn't have a return value. This should be tackled in a different PR, which will have to change the output of this PR's tests.
* GDScript: Fix calling static func from non-static is allowedDanil Alexeev2023-05-172-0/+10
|
* Add support for static variables in GDScriptGeorge Marques2023-04-274-0/+18
| | | | | | | | | | Which allows editable data associated with a particular class instead of the instance. Scripts with static variables are kept in memory indefinitely unless the `@static_unload` annotation is used or the `static_unload()` method is called on the GDScript. If the custom function `_static_init()` exists it will be called when the class is loaded, after the static variables are set.
* Merge pull request #75605 from anvilfolk/type-baseRémi Verschelde2023-04-242-0/+8
|\ | | | | | | Make GDScript type not found errors more informative.
| * Make type not found errors more informative.ocean (they/them)2023-04-022-0/+8
| | | | | | | | | | | | | | This PR removes a check for whether a datatype is a meta type when generating a datatype's to_string() result. This means that error messages that fail to find the type will now print their class names, which is much more useful when trying to identify errors.
* | GDScript: Add missing member type check when resolving `extends`Danil Alexeev2023-04-106-0/+36
|/
* GDScript: Change parser representation of class extendsDmitrii Maganov2023-03-134-0/+17
|
* Fix GDScript code style regarding colonDanil Alexeev2023-03-058-13/+13
|
* GDScript: Fix error message for unfound typeDmitrii Maganov2023-02-212-0/+5
|
* Make global scope enums accessible as types in GDScriptGeorge Marques2023-02-1912-12/+12
| | | | | | 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.
* Fix crash by freed object assign to typed variableocean (they/them)2023-02-164-0/+29
|
* Revert "Remove script class checks when getting function signature"Rémi Verschelde2023-02-073-8/+0
| | | | | | This reverts commit 0fef203b1f39c3373f9f25b8e75e75f6b03f7c88. This introduced some other issues, as discussed in #72144.
* Remove script class checks when getting function signatureAdam Scott2023-02-073-0/+8
|
* Merge pull request #72677 from dalexeev/gds-await-infer-typeYuri Sizov2023-02-062-0/+6
|\ | | | | GDScript: Fix `await` type inference
| * GDScript: Fix `await` type inferenceDanil Alexeev2023-02-062-0/+6
| |
* | GDScript: Fix inheritance check of @onready for inner classesGeorge Marques2023-02-062-0/+9
|/
* Merge pull request #72512 from vonagam/fix-ternary-type-sourceYuri Sizov2023-02-062-0/+8
|\ | | | | GDScript: Fix type certainty for result of ternary operator
| * GDScript: Fix type certainty for result of ternary operatorDmitrii Maganov2023-02-012-0/+8
| |
* | GDScript: Don't allow @onready without inheriting NodeGeorge Marques2023-02-064-0/+15
| |