summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Merge pull request #73489 from vonagam/type-check-nodeRémi Verschelde2023-02-202-0/+129
|\ \ \ \ | |/ / / |/| | | | | | | GDScript: Rework type check
| * | | GDScript: Rework type checkDmitrii Maganov2023-02-172-0/+129
| |/ /
* / / Fix inability to assign null regressionocean (they/them)2023-02-172-0/+22
|/ / | | | | | | Co-authored-by: Dmitry Maganov <vonagam@gmail.com>
* | Merge pull request #72925 from vonagam/fix-enum-typed-array-errorYuri Sizov2023-02-171-0/+4
|\ \ | | | | | | GDScript: Fix error about enum typed arrays
| * | GDScript: Fix error about enum typed arraysDmitrii Maganov2023-02-091-0/+4
| | |
* | | Merge pull request #73398 from anvilfolk/fix-getterRémi Verschelde2023-02-172-0/+11
|\ \ \ | | | | | | | | | | | | Fix unset getter return types resulting in strange behavior
| * | | Add return type for GDScript gettersocean (they/them)2023-02-152-0/+11
| | |/ | |/|
* / | Fix crash by freed object assign to typed variableocean (they/them)2023-02-164-0/+29
|/ /
* | GDScript: Fix usage of ints with typed array of floatsDmitrii Maganov2023-02-131-1/+2
| |
* | Merge pull request #72971 from vnen/gdscript-multiline-commentRémi Verschelde2023-02-094-6/+24
|\ \ | | | | | | | | | GDScript: Allow strings as multiline comments
| * | GDScript: Allow strings as multiline commentsGeorge Marques2023-02-094-6/+24
| |/ | | | | | | Bring back the behavior in 3.x that was left out by oversight.
* / GDScript: Be more lenient with identifiersGeorge Marques2023-02-096-1/+39
|/ | | | | | - 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.
* Revert "Remove script class checks when getting function signature"Rémi Verschelde2023-02-0711-63/+0
| | | | | | This reverts commit 0fef203b1f39c3373f9f25b8e75e75f6b03f7c88. This introduced some other issues, as discussed in #72144.
* Remove script class checks when getting function signatureAdam Scott2023-02-0711-0/+63
|
* Merge pull request #72546 from vonagam/fix-typed-array-can-referenceYuri Sizov2023-02-061-0/+6
|\ | | | | GDScript: Fix can_reference check for typed arrays
| * GDScript: Fix can_reference check for typed arraysDmitrii Maganov2023-02-061-0/+6
| |
* | Merge pull request #72677 from dalexeev/gds-await-infer-typeYuri Sizov2023-02-064-0/+23
|\ \ | | | | | | GDScript: Fix `await` type inference
| * | GDScript: Fix `await` type inferenceDanil Alexeev2023-02-064-0/+23
| | |
* | | Merge pull request #72804 from vnen/gdscript-no-onready-without-nodeYuri Sizov2023-02-064-0/+18
|\ \ \ | |/ / |/| | GDScript: Fix inheritance check of @onready for inner classes
| * | GDScript: Fix inheritance check of @onready for inner classesGeorge Marques2023-02-064-0/+18
| | |
* | | GDScript: Fix recently merged test not ignoring warningsRémi Verschelde2023-02-061-0/+3
|/ /
* | Merge pull request #72512 from vonagam/fix-ternary-type-sourceYuri Sizov2023-02-064-0/+22
|\ \ | | | | | | GDScript: Fix type certainty for result of ternary operator
| * | GDScript: Fix type certainty for result of ternary operatorDmitrii Maganov2023-02-014-0/+22
| | |
* | | GDScript: Don't allow @onready without inheriting NodeGeorge Marques2023-02-064-0/+15
| |/ |/|
* | Merge pull request #72608 from vnen/gdscript-warning-default-errorYuri Sizov2023-02-0515-5/+122
|\ \ | | | | | | GDScript: Add warnings that are set to error by default (take 2)
| * | GDScript: Add warnings that are set to error by defaultGeorge Marques2023-02-0215-5/+122
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* / GDScript: Improve usability of setter chainsGeorge Marques2023-02-028-0/+39
|/ | | | | | | | | - 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.
* Revert "GDScript: Add warnings that are set to error by default"Rémi Verschelde2023-02-0111-71/+5
| | | | | | | | | This reverts commit a166833bfa23a21a7bff196a85a20b014e7c1396. This caused multiple regressions. Needs to be redone with more testing before merge. Fixes #72501.
* GDScript: Add warnings that are set to error by defaultGeorge Marques2023-02-0111-5/+71
| | | | | | | | | | | | | | | | | | | | | | | - 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.
* GDScript: Allow void functions to return calls to other void functionsGeorge Marques2023-01-312-0/+30
|
* Merge pull request #72444 from reduz/fix-global-class-parsingRémi Verschelde2023-01-311-1/+1
|\ | | | | | | Fix global script class parsing.
| * Fix global script class parsing.Juan Linietsky2023-01-311-1/+1
| | | | | | | | | | | | | | | | * 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.
* | Merge pull request #69248 from vonagam/fixing-typed-arraysRémi Verschelde2023-01-3123-4/+285
|\ \ | | | | | | | | | GDScript: Fix typed arrays
| * | GDScript: Fix issues with typed arraysDmitrii Maganov2023-01-3123-4/+285
| |/
* | Merge pull request #72212 from anvilfolk/gdtestnamesRémi Verschelde2023-01-313-18/+21
|\ \ | |/ |/| | | Add option to print filenames in GDScript unit testing
| * Add option to print filenames in GDScript unit testingocean (they/them)2023-01-303-18/+21
| |
* | GDScript: Fix vararg method calls with exact argumentsDmitrii Maganov2023-01-302-0/+8
| |
* | GDScript: Fix `@export_enum` works only with `int`Danil Alexeev2023-01-302-0/+22
| |
* | Merge pull request #72285 from vnen/gdscript-variable-matchRémi Verschelde2023-01-296-0/+41
|\ \ | | | | | | GDScript: Allow variables in match patterns
| * | GDScript: Allow variables in match patternsGeorge Marques2023-01-286-0/+41
| | | | | | | | | | | | To restore an ability available in 3.x and reduce compatibility changes.
* | | Merge pull request #72286 from vnen/gdscript-native-static-call-crashRémi Verschelde2023-01-292-0/+12
|\ \ \ | | | | | | | | GDScript: Avoid calling non-static methods on native classes
| * | | GDScript: Avoid calling non-static methods on native classesGeorge Marques2023-01-282-0/+12
| |/ /
* | | Merge pull request #71844 from vonagam/fix-constant-conversionsRémi Verschelde2023-01-2924-19/+76
|\ \ \ | | | | | | | | GDScript: Fix constant conversions
| * | | GDScript: Fix constant conversionsDmitrii Maganov2023-01-2924-19/+76
| |/ /
* / / GDScript: Fix implicit conversions for function returnsDmitrii Maganov2023-01-282-0/+36
|/ /
* | GDScript: Fix test from #69163 after annotations changeRémi Verschelde2023-01-281-1/+1
| |
* | Merge pull request #69163 from vonagam/variant-safe-linesRémi Verschelde2023-01-282-0/+37
|\ \ | |/ |/| | | GDScript: Fix wrong marking of some lines related to Variant as unsafe
| * GDScript: Fix wrong marking of some lines related to Variant as unsafeDmitrii Maganov2023-01-122-0/+37
| |
* | GDScript: Fix test for read-only state of constantsDmitrii Maganov2023-01-276-22/+12
| |
* | GDScript: Allow constant expressions in annotationsDanil Alexeev2023-01-2512-16/+35
| |