summaryrefslogtreecommitdiff
path: root/modules/gdscript/tests/scripts
AgeCommit message (Collapse)Author
2022-05-18Merge pull request #55201 from Scony/fix-unreachable-code-false-positiveRémi Verschelde
2022-05-11Merge pull request #59863 from cdemirer/fix-match-multiple-bind-single-patternRémi Verschelde
Fix issues with multiple bind patterns in match statement
2022-05-11Merge pull request #60732 from CalebJohn/matching_signature_regression_testRémi Verschelde
2022-05-03Add regression test for gdscript valid function signatureCalebJohn
Previously, there was an issue where the gdscript analyzer incorrectly riased a validation error for code that had a default Dictionary, Array, or custom type.
2022-05-03quote strings inside arrays and dictionariesNathan Franke
2022-04-27Merge pull request #60396 from vnen/gdscript-self-lambdaRémi Verschelde
2022-04-24GDScript: Allow using self in lambdasGeorge Marques
2022-04-19Fixes GDScript define nested dictionary and array as constants #50285PastMoments
2022-04-04Fix issues with multiple bind patterns in match statementcdemirer
2022-03-06GDScript: Check if method signature matches the parentGeorge Marques
To guarantee polymorphism, a method signature must be compatible with the parent. This checks if: 1. Return type is the same. 2. The subclass method takes at least the same amount of parameters. 3. The matching parameters have the same type. 4. If the subclass takes more parameters, all of the extra ones have a default value. 5. If the superclass has default values, so must have the subclass. There's a few test cases to ensure this holds up.
2022-03-04Add test cases for accessing parent elements from child classstrank
2022-02-04Merge pull request #57591 from vnen/gdscript-enum-fixesRémi Verschelde
2022-02-03GDScript: Treat enum values as int and enum types as dictionaryGeorge Marques
Since enums resolve to a dictionary at runtime, calling dictionary methods on an enum type is a valid use case. This ensures this is true by adding test cases. This also makes enum values be treated as ints when used in operations.
2022-02-03GDScript: Allow tests to run on release buildsGeorge Marques
- Fix compilation issues by disabling warnings on release builds. This also strips warnings from expected result before the comparison to avoid false mismatches. - Add a `#debug-only` flag to tests. Must be the first line of the test script. Those won't run with release builds. Can be used for test cases that rely on checks only available on debug builds.
2022-02-03GDScript: Consolidate behavior for assigning enum typesGeorge Marques
This makes sure that assigning values to enum-typed variables are consistent. Same enum is always valid, different enum is always invalid (without casting) and assigning `int` creates a warning if there is no casting. There are new test cases to ensure this behavior doesn't break in the future.
2022-01-23Merge pull request #57052 from KoBeWi/nosortRémi Verschelde
2022-01-22Merge pull request #55214 from Scony/fix-gdscript-crash-2Rémi Verschelde
Fix GDScript parser crash on 'dollar mixed with assignment' expression
2022-01-22Don't sort printed Dictionarykobewi
2022-01-13GDScript: Fix parsing default parameter values from function callsstrank
2022-01-04GDScript: Add annotation to ignore warningsGeorge Marques
2022-01-02Fix various typosluz paz
Found via ` codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint,varn` Update editor/import/resource_importer_layered_texture.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update doc/classes/TileSetScenesCollectionSource.xml Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/gui/graph_edit.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/gui/rich_text_label.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Revert previously committed change
2021-12-13Fix shadowed global identifier warning duplicationYuri Roubinsky
2021-11-21Fix GDScript parser crash on 'dollar mixed with assignment' expressionPawel Lampe
fixes #53696
2021-11-21Fix 'unreachable-code' false-positive, fixes #55154Pawel Lampe
2021-11-13Allow using built-in names for variables, push warnings insteadYuri Roubinsky
2021-10-28Improve GDScript indentation error messageMax Hilbrunner
2021-10-25Refactored Node3D rotation modesreduz
* Made the Basis euler orders indexed via enum. * Node3D has a new rotation_order property to choose Euler rotation order. * Node3D has also a rotation_mode property to choose between Euler, Quaternion and Basis Exposing these modes as well as the order makes Godot a lot friendlier for animators, which can choose the best way to interpolate rotations. The new *Basis* mode makes the (exposed) transform property obsolete, so it was removed (can still be accessed by code of course).
2021-10-15Merge pull request #53843 from vnen/gdscript-typed-array-subscript-constantRémi Verschelde
Fix inferred typed array marked as constant
2021-10-15GDScript: Fix inferred typed array marked as constantGeorge Marques
2021-10-14GDScript: Properly return value with await on non-coroutineGeorge Marques
If the keyword `await` is used without a coroutine, it should still return the value synchronally.
2021-10-14Merge pull request #53807 from vnen/dont-share-arrays-and-dictsRémi Verschelde
2021-10-14Zero Dictionary and Array variants when changing type with resetGeorge Marques
So they don't reference to the old values anymore and instead refer to a new value.
2021-10-14Merge pull request #53726 from briansemrau/gd-outer-classGeorge Marques
GDScript 2.0: Access outer scope classes
2021-10-13GDScript: Access outer scope classesBrian Semrau
2021-10-12Merge pull request #53720 from vnen/gdscript-typed-array-custom-classRémi Verschelde
2021-10-12GDScript: Fix typed array with custom classesGeorge Marques
2021-10-12GDScript: Make setter parameter type same as variable typeGeorge Marques
2021-10-11Merge pull request #53103 from ZuBsPaCe/gdscript-analyze-properties-fixGeorge Marques
GDScript: Report property type errors
2021-10-09Enhance and cleanup stringify for Vectormashumafi
2021-10-08GDScript: Report property type errorsZuBsPaCe
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
2021-10-07Merge pull request #53422 from KoBeWi/add_LUA_to_GodotRémi Verschelde
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-06GDScript: Make all warnings enabled in test generationGeorge Marques
The test generation doesn't initialize the language (since it's already initialized in main), but it still needs the warning enabled so it matches the actual tests.
2021-10-05Fix LUA-style assignment in Dictionarykobewi
2021-10-04GDScript: Fix member assignment with operationGeorge Marques
It was wrongly updating the assigned value with the result of the operation.
2021-09-29Merge pull request #53216 from vnen/gdscript-builtin-type-not-idRémi Verschelde
2021-09-29GDScript: Don't allow builtin type names as identifiersGeorge Marques
2021-09-29GDScript: Fix assignment with operation for propertiesGeorge Marques