summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_analyzer.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | GDScript: Remove error when coroutine is called without awaitGeorge Marques2021-10-141-5/+5
|/ | | | | In the case the call happens as a statement, since the return value isn't used in this case.
* Merge pull request #53726 from briansemrau/gd-outer-classGeorge Marques2021-10-141-0/+5
|\ | | | | GDScript 2.0: Access outer scope classes
| * GDScript: Access outer scope classesBrian Semrau2021-10-131-0/+5
| |
* | Merge pull request #53720 from vnen/gdscript-typed-array-custom-classRémi Verschelde2021-10-121-0/+1
|\ \ | |/ |/|
| * GDScript: Fix typed array with custom classesGeorge Marques2021-10-121-0/+1
| |
* | GDScript: Make setter parameter type same as variable typeGeorge Marques2021-10-121-1/+3
|/
* GDScript: Report property type errorsZuBsPaCe2021-10-081-32/+118
| | | | | | | | | Inline getters & setters are now FunctionNodes. Their names are set in the parser, not in the compiler. GDScript-Analyzer will now run through getter and setter. Also report wrong type or signature errors regarding getset properties. Added GDScript tests for getters and setters. #53102
* GDScript: Use getter return type for the property typeGeorge Marques2021-10-071-3/+6
| | | | | | The PropertyInfo hints are more relevant for the inspector. The getter return type is more reliable and less likely to be incorrect and it is what's going to be called in the end.
* Merge pull request #53479 from vnen/gdscript-subscript-object-selfRémi Verschelde2021-10-061-1/+5
|\
| * GDScript: Allow subscript on self and object typesGeorge Marques2021-10-061-1/+5
| |
* | GDScript: Avoid hard errors on inferred typesGeorge Marques2021-10-061-11/+8
|/ | | | | | | | | Since inference isn't always correct, they are now treated as unsafe instead of errors. This also removes inferred type when a variable is reassigned. Since it's not aware of branching, the types might become invalid in a later context.
* GDScript: Use path cache when checking preloaded scriptsGeorge Marques2021-10-041-1/+7
| | | | | | | | | The path itself might not always be set in some cases, especially when the script is just created and is already in the resource cache. Using get_path() in this case gets the correct resource path. This also adds a null check for safety in case the path is incorrect or missing, to avoid a crash in the engine.
* Merge pull request #53338 from briansemrau/gdscript-handle-for-with-null-listRémi Verschelde2021-10-041-2/+4
|\
| * GDScript Check for null list in `for` loopBrian Semrau2021-10-021-2/+4
| |
* | Allow void as return type for constructorskobewi2021-10-031-1/+4
|/
* Use range iterators for `Map`Lightning_A2021-09-301-3/+3
|
* Revert "GdScript: Use reduced constant expression result when doing binary ↵Rémi Verschelde2021-09-301-10/+2
| | | | | | | | | | | | | | | | | | operations. Fixes #50293" This reverts commit 62077086076fb99fb7fe014522c44ae83f87dc4d. It broke a GDScript test (which didn't exist back when the PR was made, so was missed prior to the merge). It choked on: ``` prints("a", test_instance.a, test_instance.a == Named.VALUE_A) ``` With: ``` Invalid operands "VALUE_A (enum value)" and "int" for "==" operator. ```
* Merge pull request #51818 from MarianoGnu/gdscript2-enum-fixesRémi Verschelde2021-09-301-3/+19
|\
| * GdScript: Use reduced constant expression result when doing binary ↵Mariano Suligoy2021-08-181-2/+10
| | | | | | | | operations. Fixes #50293
| * Accept non unnamed enums as valid values for enums. Fixes #49357Mariano Suligoy2021-08-171-0/+5
| |
| * When analyzing GdScript sources, consider Enums as Dictionaries. Fixes #45558Mariano Suligoy2021-08-171-1/+4
| |
* | GDScript: Don't allow builtin type names as identifiersGeorge Marques2021-09-291-0/+5
| |
* | GDScript: Remove conversion assign mistakenly done when unneededGeorge Marques2021-09-211-1/+0
| |
* | Merge pull request #51671 from RandomShaper/fix_gdscript_crashGeorge Marques2021-09-171-6/+21
|\ \ | | | | | | Fix some GDScript bugs
| * | Fix parameter type resolution in GDScriptPedro J. Estébanez2021-09-111-2/+1
| | |
| * | Implement iterator variable typing in GDScriptPedro J. Estébanez2021-09-111-4/+20
| | |
* | | GDScript: Avoid inferred types from giving hard errorsGeorge Marques2021-09-171-3/+16
| | |
* | | Merge pull request #50456 from Blackiris/fix-extends-parent-relativeGeorge Marques2021-09-151-0/+3
|\ \ \ | | | | | | | | Fix extends with relative path to parent script
| * | | Fix extends with relative path to parent scriptJulien Nguyen2021-09-051-0/+3
| | | |
* | | | Merge pull request #52582 from ↵Rémi Verschelde2021-09-151-0/+4
|\ \ \ \ | | | | | | | | | | | | | | | jmb462/Prevent-non-explicit-inferring-parameter-from-null
| * | | | Prevent non explicit inferring parameter from nulljmb4622021-09-111-0/+4
| | | | |
* | | | | Merge pull request #52632 from vnen/autoload-global-script-class-conflictRémi Verschelde2021-09-131-1/+12
|\ \ \ \ \ | | | | | | | | | | | | Disallow class names to be the same as global names
| * | | | | Disallow class names to be the same as global namesGeorge Marques2021-09-131-1/+12
| |/ / / / | | | | | | | | | | | | | | | Also forbid autoloads to have the same name as global script class.
* | | | | Merge pull request #52100 from vnen/gdscript-access-outer-constantsRémi Verschelde2021-09-131-9/+25
|\ \ \ \ \ | |/ / / / |/| | | | GDScript: Allow access to outer constant and enum values
| * | | | GDScript: Allow access to outer constant and enum valuesGeorge Marques2021-08-241-9/+25
| | |/ / | |/| |
* | | | Merge pull request #49897 from Blackiris/fix-dollar-point-crash-on-editorGeorge Marques2021-09-101-0/+3
|\ \ \ \ | |_|/ / |/| | | Fix crash when writing $. in the editor
| * | | Fix crash when writing $. in the editorJulien Nguyen2021-07-081-0/+3
| | | |
* | | | Merge pull request #52329 from ↵Max Hilbrunner2021-09-031-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | ZuBsPaCe/gdscript-unused-private-class-variable-fix GDScript: Fix for UNUSED_PRIVATE_CLASS_VARIABLE
| * | | | GDScript: Count usages of member variables.ZuBsPaCe2021-09-031-0/+1
| | | | | | | | | | | | | | | | | | | | Otherwise private member variables will always lead to UNUSED_PRIVATE_CLASS_VARIABLE.
* | | | | Check for GDScript member and class naming conflicts in a variety of conditions.SaracenOne2021-09-021-1/+84
|/ / / /
* | / / Rename String::is_rel_path to String::is_relative_pathWilson E. Alvarez2021-08-291-1/+1
| |/ / |/| |
* | | GDScript: Make singleton functions be seen as staticGeorge Marques2021-08-201-1/+6
| | | | | | | | | | | | Since those can be called without an instance.
* | | GDScript: Fix calling builtin static functionsGeorge Marques2021-08-181-1/+3
| | |
* | | GDScript: Fix issue when calling `new()` on its ownGeorge Marques2021-08-181-2/+2
| | |
* | | GDScript: Fix inner classes and preloaded scripts as typesGeorge Marques2021-08-181-0/+29
| | |
* | | Remove underscore hacksMax Hilbrunner2021-08-171-25/+16
| |/ |/| | | | | | | | | Way less cruft. :) Co-authored-by: Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com>
* | Use C++ iterators for Lists in many situationsAaron Franke2021-07-231-29/+26
|/
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-1/+1
|
* Merge pull request #49287 from reduz/expose-variant-internal-bindersRémi Verschelde2021-06-191-0/+1
|\ | | | | Make some Variant internal functions public.
| * GDScript: Fix setting type of operator return valueGeorge Marques2021-06-181-0/+1
| | | | | | | | Also write type adjust when needed for binary operators.