e8696f9961
GDScript: Improve call analysis
...
* Add missing `UNSAFE_CALL_ARGUMENT` warning.
* Fix `Object` constructor.
* Display an error for non-existent static methods.
2023-09-21 13:36:39 +03:00
3c35e7f1d6
GDScript: Make array literal typed if for loop variable type is specified
2023-09-21 11:25:59 +03:00
b1eb737719
GDScript: Fix some lambda bugs
2023-09-14 14:22:23 +03:00
462d8f4752
GDScript: Fix get_*_list() methods return incorrect info
2023-09-04 00:21:03 +03:00
6c59ed9485
GDScript: Add static typing for for loop variable
2023-08-17 20:54:34 +03:00
f19377160c
GDScript: Fix regression with native signal not found
2023-08-02 15:42:36 +03:00
efbff1369a
Merge pull request #78254 from dalexeev/gds-fix-property-group-name-conflict
...
GDScript: Fix conflict between property and group names
2023-07-31 21:01:03 +02:00
faf3faa8c8
Merge pull request #77744 from dalexeev/gds-reset-block-locals-on-exit
...
GDScript: Reset local variables on exit from block
2023-06-21 21:51:05 +02:00
248e5245e4
Merge pull request #73540 from mashumafi/fix-typed-array-add
...
Fix: Typed arrays aren't working with +
2023-06-20 15:12:39 +02:00
a0577eb23b
GDScript: Fix _get_script_name() function collision for SCU build
2023-06-20 12:03:54 +03:00
c211c22abc
Merge pull request #78389 from rune-scape/rune-match-stringnames
...
GDScript: Strings and StringNames match
2023-06-19 21:18:42 +02:00
ae00187b58
Merge pull request #77129 from dalexeev/gds-fix-static-var-bugs-part-1
...
GDScript: Fix some bugs with static variables and functions
2023-06-19 21:18:18 +02:00
4db1d09bf5
Merge pull request #73657 from mashumafi/callable-ctor
...
Fix: Get constructor as Callable
2023-06-18 16:27:42 +02:00
aebbbda080
GDScript: Fix some bugs with static variables and functions
2023-06-16 22:52:11 +03:00
bf8f996212
GDScript: Fix conflict between property and group names
2023-06-15 08:36:10 +03:00
fcdd926881
GDScript: Strings and StringNames match
2023-06-14 19:24:28 -07:00
72b8d397d0
GDScript: Further restrict test error output for C++ errors
...
MSVC and GCC/Clang also have different function names...
2023-06-14 13:28:52 +02:00
c40adf027d
GDScript: Only include script file path in test error output
...
Errors originating in C++ files cause unnecessary diffs whenever the engine is updated
(line number changes, etc.) and would cause CI failures due to different formatting
of the file path on Windows (backslashes, worked around here anyway) and when using
SCU builds (`../scu` insert).
2023-06-14 10:54:49 +02:00
8b62c52d1c
Merge pull request #75419 from vonagam/fix-super-classes-in-array-literals
...
GDScript: Allow elements of a parent class in a typed array literal
2023-06-14 09:23:32 +02:00
f3bf75fbb4
GDScript: Reset local variables on exit from block
2023-06-02 13:20:19 +03:00
0ba6048ad3
Add support for static variables in GDScript
...
Which allows editable data associated with a particular class instead of
the instance. Scripts with static variables are kept in memory
indefinitely unless the `@static_unload` annotation is used or the
`static_unload()` method is called on the GDScript.
If the custom function `_static_init()` exists it will be called when
the class is loaded, after the static variables are set.
2023-04-27 09:51:44 -03:00
abbdf80643
GDScript: Don't fail when freed object is return
...
This is check is a bit too eager. The user should be able to handle the
return value even if it's a freed object.
2023-04-26 10:57:22 -03:00
e5365da03c
[GDScript] Fix incorrect compound assignment
...
Reverts in-place compound assignments
Added test to ensure correctness
2023-04-14 11:28:44 +02:00
8655d979a1
GDScript: Allow elements of a parent class in a typed array literal
2023-03-28 13:47:24 +03:00
c0eeb32e38
GDScript: Fix false positive REDUNDANT_AWAIT warning
2023-03-16 14:04:14 +03:00
ea5fd3d732
Fix GDScript code style regarding colon
2023-03-05 17:03:20 +03:00
c0f1ed57c4
Merge pull request #73915 from vonagam/fix-conversions-from-native-member
...
GDScript: Fix conversions from native members accessed by identifier
2023-02-26 19:02:27 +01:00
c118790eb9
Merge pull request #73899 from vnen/gdscript-init-defaults-beforehand
...
GDScript: Initialize all defaults beforehand in implicit constructor
2023-02-26 15:59:27 +01:00
eba984a44f
Revert "GDScript: Fix groups and categories been seen as members"
...
This reverts commit 6f2a8434c6 .
The commit introduces a bug where it creates spurious entries for member
information.
2023-02-25 13:40:31 -03:00
281c8c75d3
GDScript: Fix conversions from native members accessed by identifier
2023-02-25 10:53:36 +02:00
0e6aa6fc38
GDScript: Initialize all defaults beforehand in implicit constructor
...
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-24 22:01:06 -03:00
a6baebc7c2
Fixup GDScript test using non-deterministic ids
...
Follow-up to #73870 .
2023-02-24 14:31:36 +01:00
6f2a8434c6
GDScript: Fix groups and categories been seen as members
2023-02-24 10:03:12 -03:00
2a12213c31
Fix: Typed arrays aren't working with +
2023-02-22 18:42:26 -05:00
8eb837dc3d
Add test for const class references
2023-02-20 23:01:32 -05:00
b39b4010bd
Fix: Get constructor as Callable
2023-02-20 22:05:54 -05:00
30d4d3fa5e
Fix: Func with typed args error when arg is null
2023-02-19 21:47:48 -05:00
98921d8fba
Revert "Remove script class checks when getting function signature"
...
This reverts commit 0fef203b1f .
This introduced some other issues, as discussed in #72144 .
2023-02-07 16:28:52 +01:00
0fef203b1f
Remove script class checks when getting function signature
2023-02-07 11:48:10 +01:00
5fc7918594
GDScript: Improve usability of setter chains
...
- 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-02 10:20:35 -03:00
5909f9f075
GDScript: Fix issues with typed arrays
2023-01-31 11:54:41 +02:00
aee7b7363b
GDScript: Avoid calling non-static methods on native classes
2023-01-28 20:33:01 -03:00
abe6d67232
GDScript: Fix test for read-only state of constants
2023-01-27 05:28:08 +02:00
b004f8180e
GDScript: Allow constant expressions in annotations
2023-01-25 18:43:56 +03:00
40613ebd21
GDScript: Fix typing of iterator in for loop
2023-01-13 15:36:11 +02:00
e3e55b29ce
Add default virtual gdscript:// path to GDScript instances
2023-01-12 10:27:38 -05:00
75515e4303
Merge pull request #70987 from vonagam/fix-parameter-conversion-assign
2023-01-12 11:34:13 -03:00
66fda2aeea
GDScript: Fix temp values being written without proper clear
...
Temporary values in the stack were not being properly cleared when the
return value of calls were discarded, which can cause memory issues
especially for reference types like PackedByteArray.
2023-01-11 14:24:23 -03:00
5eb161a9c8
Merge pull request #70595 from adamscott/add-gdscript-editorconfig
...
Add GDScript `.editorconfig` rules
2023-01-11 01:10:10 +01:00
04d0e851ea
GDScript: Fix use of conversion assign for variant values
2023-01-10 20:01:11 -03:00