summaryrefslogtreecommitdiff
path: root/modules/gdscript/tests
AgeCommit message (Collapse)Author
2023-02-24GDScript: Initialize all defaults beforehand in implicit constructorGeorge Marques
Set all the default values for typed variables before actually trying to initialize them, including `@onready` ones. This ensures that if validated calls are being used there will be a value of the correct type, even if the resolution is done out of order or deferred because of `@onready`.
2023-02-24Fixup GDScript test using non-deterministic idsRémi Verschelde
Follow-up to #73870.
2023-02-24Merge pull request #73870 from vnen/gdscript-dont-reference-group-propertiesRémi Verschelde
GDScript: Fix groups and categories been seen as members
2023-02-24GDScript: Fix groups and categories been seen as membersGeorge Marques
2023-02-24GDScript: Fix range regressionDmitrii Maganov
2023-02-23Merge pull request #73798 from vonagam/fix-bad-continue-in-lambdaRémi Verschelde
GDScript: Fix parsing unexpected break/continue in lambda
2023-02-23GDScript: Fix parsing unexpected break/continue in lambdaDmitrii Maganov
2023-02-23GDScript: Fix usage of enum value as range argumentDmitrii Maganov
2023-02-21Merge pull request #73709 from vonagam/fix-error-message-unfound-typeRémi Verschelde
GDScript: Fix error message for unfound type
2023-02-21Merge pull request #73705 from anvilfolk/doublewoopsieRémi Verschelde
Added check for null objects in gdscript typed assign.
2023-02-21GDScript: Fix error message for unfound typeDmitrii Maganov
2023-02-21Added check for null objects in gdscript typed assign.ocean (they/them)
2023-02-21GDScript: Fix override signature check of script inheritanceGeorge Marques
Avoid treating the super class as a meta type for signature check, since it is looking at the instance level for that.
2023-02-20Add test for const class referencesmashumafi
2023-02-20Merge pull request #73590 from vnen/gdscript-global-scope-enumsRémi Verschelde
Make global scope enums accessible as types in GDScript
2023-02-20Merge pull request #73544 from mashumafi/fix-func-arg-nullRémi Verschelde
Fix: Func with typed args error when arg is null
2023-02-20Merge pull request #73489 from vonagam/type-check-nodeRémi Verschelde
GDScript: Rework type check
2023-02-19Fix: Func with typed args error when arg is nullmashumafi
2023-02-19Make global scope enums accessible as types in GDScriptGeorge Marques
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.
2023-02-17GDScript: Rework type checkDmitrii Maganov
2023-02-17Fix inability to assign null regressionocean (they/them)
Co-authored-by: Dmitry Maganov <vonagam@gmail.com>
2023-02-17Merge pull request #72925 from vonagam/fix-enum-typed-array-errorYuri Sizov
GDScript: Fix error about enum typed arrays
2023-02-17Merge pull request #73398 from anvilfolk/fix-getterRémi Verschelde
Fix unset getter return types resulting in strange behavior
2023-02-16Fix crash by freed object assign to typed variableocean (they/them)
2023-02-15Add return type for GDScript gettersocean (they/them)
2023-02-13GDScript: Fix usage of ints with typed array of floatsDmitrii Maganov
2023-02-09Merge pull request #72971 from vnen/gdscript-multiline-commentRémi Verschelde
GDScript: Allow strings as multiline comments
2023-02-09GDScript: Be more lenient with identifiersGeorge Marques
- Allow identifiers similar to keywords if they are in ASCII range. - Allow constants to be treated as regular identifiers. - Allow keywords that can be used as identifiers in expressions.
2023-02-09GDScript: Allow strings as multiline commentsGeorge Marques
Bring back the behavior in 3.x that was left out by oversight.
2023-02-09GDScript: Fix error about enum typed arraysDmitrii Maganov
2023-02-07Revert "Remove script class checks when getting function signature"Rémi Verschelde
This reverts commit 0fef203b1f39c3373f9f25b8e75e75f6b03f7c88. This introduced some other issues, as discussed in #72144.
2023-02-07Remove script class checks when getting function signatureAdam Scott
2023-02-06Merge pull request #72546 from vonagam/fix-typed-array-can-referenceYuri Sizov
GDScript: Fix can_reference check for typed arrays
2023-02-06Merge pull request #72677 from dalexeev/gds-await-infer-typeYuri Sizov
GDScript: Fix `await` type inference
2023-02-06Merge pull request #72804 from vnen/gdscript-no-onready-without-nodeYuri Sizov
GDScript: Fix inheritance check of @onready for inner classes
2023-02-06GDScript: Fix `await` type inferenceDanil Alexeev
2023-02-06GDScript: Fix can_reference check for typed arraysDmitrii Maganov
2023-02-06GDScript: Fix inheritance check of @onready for inner classesGeorge Marques
2023-02-06GDScript: Fix recently merged test not ignoring warningsRémi Verschelde
2023-02-06Merge pull request #72512 from vonagam/fix-ternary-type-sourceYuri Sizov
GDScript: Fix type certainty for result of ternary operator
2023-02-06GDScript: Don't allow @onready without inheriting NodeGeorge Marques
2023-02-05Merge pull request #72608 from vnen/gdscript-warning-default-errorYuri Sizov
GDScript: Add warnings that are set to error by default (take 2)
2023-02-02GDScript: Add warnings that are set to error by defaultGeorge Marques
- Adds a list of default levels for all warning so they can be set individually. - Add warnings set by default to error for: - Using `get_node()` without `@onready`. - Using `@onready` together with `@export`. - Inferring a static type with a Variant value. - Overriding a native engine method. - Adjust how annotations to ignore warnings are treated so they also apply to method parameters. - Clean up a bit how ignored warnings are set. There were two sets but only one was actually being used. - Set all warnings to the `WARN` level for tests, so they they can be properly tested. - Fix enum types in native methods signatures being set to `int`. - Fix native enums being treated as Dictionary by mistake. - Make name of native enum types use the class they are defined in, not the direct super class of the script. This ensures they are always equal even when coming from different sources. - Fix error for signature mismatch that was only showing the first default argument as having a default. Now it shows for all.
2023-02-02GDScript: Improve usability of setter chainsGeorge Marques
- Consider PackedArrays non-shared since they are copied on C++/script boundaries. - Add error messages in the analyzer when assigning to read-only properties. - Add specific error message at runtime when assignment fails because the property is read-only.
2023-02-01GDScript: Fix type certainty for result of ternary operatorDmitrii Maganov
2023-02-01Revert "GDScript: Add warnings that are set to error by default"Rémi Verschelde
This reverts commit a166833bfa23a21a7bff196a85a20b014e7c1396. This caused multiple regressions. Needs to be redone with more testing before merge. Fixes #72501.
2023-02-01GDScript: Add warnings that are set to error by defaultGeorge Marques
- Adds a list of default levels for all warning so they can be set individually. - Add warnings set by default to error for: - Using `get_node()` without `@onready`. - Using `@onready` together with `@export`. - Inferring a static type with a Variant value. - Overriding a native engine method. - Adjust how annotations to ignore warnings are treated so they also apply to method parameters. - Clean up a bit how ignored warnings are set. There were two sets but only one was actually being used. - Set all warnings to the `WARN` level for tests, so they they can be properly tested. - Fix enum types in native methods signatures being set to `int`. - Fix native enums being treated as Dictionary by mistake. - Make name of native enum types use the class they are defined in, not the direct super class of the script. This ensures they are always equal even when coming from different sources. - Fix error for signature mismatch that was only showing the first default argument as having a default. Now it shows for all.
2023-01-31GDScript: Allow void functions to return calls to other void functionsGeorge Marques
2023-01-31Merge pull request #72444 from reduz/fix-global-class-parsingRémi Verschelde
Fix global script class parsing.
2023-01-31Fix global script class parsing.Juan Linietsky
* Broke with #72226 * Restored previous version of the code, made it even more error tolerant. * Added a warning to **not** change the code. Fixes #72226.