summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_analyzer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* GDScript: Fix bug with identifier shadowed below in current scopeDanil Alexeev2023-07-261-0/+19
|
* Merge pull request #75620 from ↵Yuri Sizov2023-07-251-24/+23
|\ | | | | | | | | | | jpcerrone/fix_shadow_warnings_not_going_away_after_ignoring Fix for not being able to ignore shadowing warnings on class scope
| * Fix for not being able to ignore shadowing warnings on class scopejpcerrone2023-07-241-24/+23
| |
* | Script editor: Show depended script errorsrune-scape2023-07-241-0/+4
|/
* GDScript: fix regression when checking for virtual function implementation.ocean (they/them)2023-06-211-10/+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.
* Make container element type comparison safeYuri Sizov2023-06-201-1/+1
|
* Merge pull request #73540 from mashumafi/fix-typed-array-addRémi Verschelde2023-06-201-3/+22
|\ | | | | Fix: Typed arrays aren't working with +
| * Fix: Typed arrays aren't working with +mashumafi2023-02-221-3/+22
| |
* | Merge pull request #77129 from dalexeev/gds-fix-static-var-bugs-part-1Rémi Verschelde2023-06-191-2/+8
|\ \ | | | | | | | | | GDScript: Fix some bugs with static variables and functions
| * | GDScript: Fix some bugs with static variables and functionsDanil Alexeev2023-06-161-2/+8
| | |
* | | Merge pull request #74741 from vnen/variant-not-for-everyoneRémi Verschelde2023-06-181-0/+11
|\ \ \ | | | | | | | | | | | | Allow boolean operators for all Variant types
| * | | GDScript: Allow boolean operators between any typesGeorge Marques2023-03-101-0/+11
| | | | | | | | | | | | | | | | | | | | To make consistent with previous behavior. Mostly to be used in conditions for `if` and `while`.
* | | | Merge pull request #73657 from mashumafi/callable-ctorRémi Verschelde2023-06-181-1/+11
|\ \ \ \ | |_|/ / |/| | | | | | | Fix: Get constructor as Callable
| * | | Fix: Get constructor as Callablemashumafi2023-02-201-1/+11
| | | |
* | | | Merge pull request #77324 from anvilfolk/oh-no-its-virtualRémi Verschelde2023-06-151-30/+36
|\ \ \ \ | | | | | | | | | | | | | | | GDScript: add errors when calling unimplemented virtual functions
| * | | | GDScript: add errors when calling unimplemented virtual functionsocean (they/them)2023-06-151-30/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Style: Harmonize header includes in modulesRémi Verschelde2023-06-151-2/+3
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This applies our existing style guide, and adds a new rule to that style guide for modular components such as platform ports and modules: Includes from the platform port or module ("local" includes) should be listed first in their own block using relative paths, before Godot's "core" includes which use "absolute" (project folder relative) paths, and finally thirdparty includes. Includes in `#ifdef`s come after their relevant section, i.e. the overall structure is: - Local includes * Conditional local includes - Core includes * Conditional core includes - Thirdparty includes * Conditional thirdparty includes
* | | | Merge pull request #77351 from anvilfolk/super-discardRémi Verschelde2023-06-151-2/+3
|\ \ \ \ | | | | | | | | | | | | | | | GDScript: do not RETURN_VALUE_DISCARDED for `super()` inside `_init()`
| * | | | GDScript: do not warn of return value discarded for super() inside _init()ocean (they/them)2023-05-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DO NOT BATCH MERGE WITH #77324, WILL RESULT IN BROKEN CI Currently, calling super() inside _init() throws a RETURN_VALUE_DISCARDED warning. The analyzer identifies super() as being a constructor, which therefore returns an object of the relevant class. However, super() isn't really a constructor by itself: in this case, it is _part_ of the constructor, and so doesn't "return" a value. A test case for this is already in #77324, which contains the warning. I am duplicating it here, without the warning, and it should conflict with the other PR.
* | | | | Merge pull request #75419 from vonagam/fix-super-classes-in-array-literalsRémi Verschelde2023-06-141-0/+4
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | GDScript: Allow elements of a parent class in a typed array literal
| * | | | | GDScript: Allow elements of a parent class in a typed array literalDmitrii Maganov2023-03-281-0/+4
| | | | | |
* | | | | | GDScript: Fix calling static func from non-static is allowedDanil Alexeev2023-05-171-0/+4
| |/ / / / |/| | | |
* | | | | GDScript: Fix `validate_call_arg()` for unresolved datatypeDanil Alexeev2023-05-151-3/+5
| | | | |
* | | | | GDScript: Fix warning ignoring for member variablesDanil Alexeev2023-05-121-2/+3
| | | | |
* | | | | Merge pull request #76412 from dalexeev/gds-reorganize-warningsRémi Verschelde2023-04-281-5/+9
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | GDScript: Reorganize and unify warnings
| * | | | | GDScript: Reorganize and unify warningsDanil Alexeev2023-04-281-5/+9
| | | | | |
* | | | | | Merge pull request #75014 from vonagam/assert-literal-falseRémi Verschelde2023-04-281-1/+1
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | GDScript: Allow usage of literal false in assert without a warning
| * | | | | GDScript: Allow usage of literal false in assert without a warningDmitrii Maganov2023-03-171-1/+1
| | |_|/ / | |/| | |
* | | | | Add support for static variables in GDScriptGeorge Marques2023-04-271-16/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 #75691 from dalexeev/gds-fix-signature-generationYuri Sizov2023-04-141-1/+2
|\ \ \ \ \ | | | | | | | | | | | | GDScript: Misc fixes and improvements for signature generation
| * | | | | GDScript: Misc fixes and improvements for signature generationDanil Alexeev2023-04-071-1/+2
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use type hints for `@GlobalScope` enums. * Use plain `int` for `BitMask<T>`. * Fix type hints for typed arrays. * Use `Variant` and `void` type hints. * Discard unnecessary class prefix.
* / | | | GDScript: Add missing member type check when resolving `extends`Danil Alexeev2023-04-101-1/+21
|/ / / /
* | | | Merge pull request #74949 from dalexeev/gds-fix-await-warningYuri Sizov2023-03-201-1/+1
|\ \ \ \ | | | | | | | | | | GDScript: Fix false positive `REDUNDANT_AWAIT` warning
| * | | | GDScript: Fix false positive `REDUNDANT_AWAIT` warningDanil Alexeev2023-03-161-1/+1
| |/ / /
* | | | Merge pull request #74844 from vonagam/change-class-extends-parsingYuri Sizov2023-03-201-16/+16
|\ \ \ \ | | | | | | | | | | GDScript: Change parser representation of class extends
| * | | | GDScript: Change parser representation of class extendsDmitrii Maganov2023-03-131-16/+16
| |/ / /
* / / / GDScript: Fix missing warning for shadowing of built-in typesDmitrii Maganov2023-03-131-13/+15
|/ / /
* | | GDScript: Fix wrong unsafety mark for binary operatorDmitrii Maganov2023-02-261-1/+1
| | |
* | | GDScript: Fix range regressionDmitrii Maganov2023-02-241-12/+23
| | |
* | | GDScript: Fix usage of enum value as range argumentDmitrii Maganov2023-02-231-14/+10
| | |
* | | GDScript: Fix error message for unfound typeDmitrii Maganov2023-02-211-1/+1
| | |
* | | Merge pull request #73693 from vnen/gdscript-fix-script-signature-checkRémi Verschelde2023-02-211-0/+1
|\ \ \ | | | | | | | | | | | | GDScript: Fix override signature check of script inheritance
| * | | GDScript: Fix override signature check of script inheritanceGeorge Marques2023-02-211-0/+1
| |/ / | | | | | | | | | | | | Avoid treating the super class as a meta type for signature check, since it is looking at the instance level for that.
* / / GDScript: Fix crash when autoload script can't be foundGeorge Marques2023-02-211-0/+4
|/ /
* | Merge pull request #73590 from vnen/gdscript-global-scope-enumsRémi Verschelde2023-02-201-16/+113
|\ \ | | | | | | | | | Make global scope enums accessible as types in GDScript
| * | Make global scope enums accessible as types in GDScriptGeorge Marques2023-02-191-16/+113
| |/ | | | | | | | | | | 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.
* | Merge pull request #73489 from vonagam/type-check-nodeRémi Verschelde2023-02-201-39/+51
|\ \ | | | | | | | | | GDScript: Rework type check
| * | GDScript: Rework type checkDmitrii Maganov2023-02-171-39/+51
| |/
* | Merge pull request #73291 from vonagam/fix-unsafe-weak-binopRémi Verschelde2023-02-201-0/+2
|\ \ | |/ |/| | | GDScript: Fix missing unsafety mark for binary op with weak variables
| * GDScript: Fix missing unsafety mark for binary op with weak variablesDmitrii Maganov2023-02-141-0/+2
| |