summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_analyzer.cpp
AgeCommit message (Collapse)Author
2021-10-07GDScript: Use getter return type for the property typeGeorge Marques
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.
2021-10-06Merge pull request #53479 from vnen/gdscript-subscript-object-selfRémi Verschelde
2021-10-06GDScript: Allow subscript on self and object typesGeorge Marques
2021-10-06GDScript: Avoid hard errors on inferred typesGeorge Marques
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.
2021-10-04GDScript: Use path cache when checking preloaded scriptsGeorge Marques
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.
2021-10-04Merge pull request #53338 from briansemrau/gdscript-handle-for-with-null-listRémi Verschelde
2021-10-03Allow void as return type for constructorskobewi
2021-10-02GDScript Check for null list in `for` loopBrian Semrau
2021-09-30Use range iterators for `Map`Lightning_A
2021-09-30Revert "GdScript: Use reduced constant expression result when doing binary ↵Rémi Verschelde
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. ```
2021-09-30Merge pull request #51818 from MarianoGnu/gdscript2-enum-fixesRémi Verschelde
2021-09-29GDScript: Don't allow builtin type names as identifiersGeorge Marques
2021-09-21GDScript: Remove conversion assign mistakenly done when unneededGeorge Marques
2021-09-17Merge pull request #51671 from RandomShaper/fix_gdscript_crashGeorge Marques
Fix some GDScript bugs
2021-09-17GDScript: Avoid inferred types from giving hard errorsGeorge Marques
2021-09-15Merge pull request #50456 from Blackiris/fix-extends-parent-relativeGeorge Marques
Fix extends with relative path to parent script
2021-09-15Merge pull request #52582 from ↵Rémi Verschelde
jmb462/Prevent-non-explicit-inferring-parameter-from-null
2021-09-13Merge pull request #52632 from vnen/autoload-global-script-class-conflictRémi Verschelde
Disallow class names to be the same as global names
2021-09-13Merge pull request #52100 from vnen/gdscript-access-outer-constantsRémi Verschelde
GDScript: Allow access to outer constant and enum values
2021-09-13Disallow class names to be the same as global namesGeorge Marques
Also forbid autoloads to have the same name as global script class.
2021-09-11Prevent non explicit inferring parameter from nulljmb462
2021-09-11Fix parameter type resolution in GDScriptPedro J. Estébanez
2021-09-11Implement iterator variable typing in GDScriptPedro J. Estébanez
2021-09-10Merge pull request #49897 from Blackiris/fix-dollar-point-crash-on-editorGeorge Marques
Fix crash when writing $. in the editor
2021-09-05Fix extends with relative path to parent scriptJulien Nguyen
2021-09-03Merge pull request #52329 from ↵Max Hilbrunner
ZuBsPaCe/gdscript-unused-private-class-variable-fix GDScript: Fix for UNUSED_PRIVATE_CLASS_VARIABLE
2021-09-03GDScript: Count usages of member variables.ZuBsPaCe
Otherwise private member variables will always lead to UNUSED_PRIVATE_CLASS_VARIABLE.
2021-09-02Check for GDScript member and class naming conflicts in a variety of conditions.SaracenOne
2021-08-29Rename String::is_rel_path to String::is_relative_pathWilson E. Alvarez
2021-08-24GDScript: Allow access to outer constant and enum valuesGeorge Marques
2021-08-20GDScript: Make singleton functions be seen as staticGeorge Marques
Since those can be called without an instance.
2021-08-18GDScript: Fix calling builtin static functionsGeorge Marques
2021-08-18GDScript: Fix issue when calling `new()` on its ownGeorge Marques
2021-08-18GDScript: Fix inner classes and preloaded scripts as typesGeorge Marques
2021-08-18GdScript: Use reduced constant expression result when doing binary ↵Mariano Suligoy
operations. Fixes #50293
2021-08-17Accept non unnamed enums as valid values for enums. Fixes #49357Mariano Suligoy
2021-08-17When analyzing GdScript sources, consider Enums as Dictionaries. Fixes #45558Mariano Suligoy
2021-08-17Remove underscore hacksMax Hilbrunner
Way less cruft. :) Co-authored-by: Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com>
2021-07-23Use C++ iterators for Lists in many situationsAaron Franke
2021-07-08Fix crash when writing $. in the editorJulien Nguyen
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-06-19Merge pull request #49287 from reduz/expose-variant-internal-bindersRémi Verschelde
Make some Variant internal functions public.
2021-06-18Merge pull request #49449 from SpectralDragon/fix-enum-equal-operationGeorge Marques
Fix equal operation for typed enums
2021-06-18GDScript: Fix setting type of operator return valueGeorge Marques
Also write type adjust when needed for binary operators.
2021-06-11Rename Reference to RefCountedPedro J. Estébanez
2021-06-11Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde
File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
2021-06-09Fix equal operation for typed enumsВладислав Прусаков
2021-06-04Rename Quat to QuaternionMarcel Admiraal
2021-06-03Rename Variant TRANSFORM to TRANSFORM3DAaron Franke
Also _transform to _transform3d
2021-05-26Merge pull request #49114 from vnen/gdscript-fix-self-function-type-checkRémi Verschelde
GDScript: Fix function signature check for self calls