Commit Graph

2612 Commits

Author SHA1 Message Date
21bb5b9c0e 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.

(cherry picked from commit abbdf80643)
2023-04-27 08:49:29 +02:00
aff0340486 GDScript: Fix wrong increment for disassembly of lambda
(cherry picked from commit 5b49382d38)
2023-04-27 08:49:29 +02:00
ee9a268fd7 GDScript: Use default path in test generator if not provided
Since it's almost always used with the same path, assume it is running
from the Godot source root.

(cherry picked from commit 221deb1cc1)
2023-04-27 08:41:36 +02:00
0132c29953 Fix wrong file on function call error
(cherry picked from commit 464a299d2e)
2023-04-26 14:50:59 +02:00
e03ee06d74 Fix GDScript LSP variable rename
(cherry picked from commit 10fe6f14bb)
2023-04-26 14:32:22 +02:00
4d38529284 Fix for mixed tabs and spaces in gdscript
(cherry picked from commit fecbc12d17)
2023-04-26 14:29:27 +02:00
769daf79e2 Fix multi-line string highlighting with single quotes.
(cherry picked from commit bdb7045e2c)
2023-04-26 14:14:05 +02:00
e6478f5be3 Fix typo when parsing LSP function parameters
(cherry picked from commit 879791e305)
2023-04-24 17:08:56 +02:00
d31002cfbe GDScript: Add missing member type check when resolving extends
(cherry picked from commit 66279b98b6)
2023-04-24 17:00:35 +02:00
b5ff677381 Poll LSP/DAP clients for connection status updates
(cherry picked from commit 4be4eeea3a)
2023-04-24 14:16:37 +02:00
d0e906327d Fix typo and slightly reword in @GDScript.xml
Fix "the every following property" to "then every following property" and change "is added" to "will be added".

(cherry picked from commit e1c0df7048)
2023-04-03 18:41:54 +02:00
07beae98f0 GDScript: Fix false positive REDUNDANT_AWAIT warning
(cherry picked from commit c0eeb32e38)
2023-03-30 19:17:15 +02:00
9559bbcb18 Improve Color8 documentation
This documents in which situations Color8 is most suited and its
precision limitations.

(cherry picked from commit 4e4555bea5)
2023-03-27 17:35:47 +02:00
2e37c05fe6 Make GDScript number highlighting stricter
(cherry picked from commit 952703d921)
2023-03-27 16:58:50 +02:00
23f2c1234c GDScript: Fix autocomplete inside a block with a type test condition
(cherry picked from commit e289a4ab2c)
2023-03-14 13:59:04 +01:00
5ae484c138 Fix error spam when naming a func at the end of the script
(cherry picked from commit 07dd627728)
2023-03-14 13:59:03 +01:00
079c8ea719 GDScript: Fix checking if a call is awaited in compiler
(cherry picked from commit 55a2ad25bf)
2023-03-13 21:54:05 +01:00
f4ea9df0f4 Fix GDScript code style regarding colon
(cherry picked from commit ea5fd3d732)
2023-03-13 14:42:27 +01:00
048c252602 Prevent cache corruption when saving resources in the editor
(cherry picked from commit 496bd94c21)
2023-03-13 14:16:13 +01:00
491ded1898 Minor typo and docs URL fixes 2023-02-28 13:38:01 +01:00
bd5ab9f9b4 Remove unused ScriptLanguage methods 2023-02-26 22:30:56 -08: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
1bd0b296e1 Merge pull request #73964 from vonagam/fix-coroutine-compiler-type
GDScript: Fix address type for coroutine results
2023-02-26 16:00:17 +01:00
92d47f84fe Merge pull request #73957 from vonagam/fix-binary-op-safety
GDScript: Fix wrong unsafety mark for binary operator
2023-02-26 15:59:54 +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
4efaf15605 GDScript: Fix address type for coroutine results 2023-02-26 08:30:46 +02:00
638aa4f811 GDScript: Fix wrong unsafety mark for binary operator 2023-02-26 01:35:53 +02: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
defa46bfd1 GDScript: Don't use validated call for vararg methods
Since they may have runtime type validation, we cannot use the validated
call.
2023-02-24 14:06:02 -03:00
a6baebc7c2 Fixup GDScript test using non-deterministic ids
Follow-up to #73870.
2023-02-24 14:31:36 +01:00
7e00cc1f7a Merge pull request #73870 from vnen/gdscript-dont-reference-group-properties
GDScript: Fix groups and categories been seen as members
2023-02-24 14:08:20 +01:00
6f2a8434c6 GDScript: Fix groups and categories been seen as members 2023-02-24 10:03:12 -03:00
55c5774be9 GDScript: Fix range regression 2023-02-24 00:35:11 +02:00
76d80c2cba Merge pull request #73798 from vonagam/fix-bad-continue-in-lambda
GDScript: Fix parsing unexpected break/continue in lambda
2023-02-23 13:54:56 +01:00
b0b1eaeb6d GDScript: Fix parsing unexpected break/continue in lambda 2023-02-23 10:49:06 +02:00
7ee011051a GDScript: Fix usage of enum value as range argument 2023-02-23 10:38:53 +02:00
a98a0f5d34 Document @GDScript.is_instance_of method 2023-02-22 17:06:55 +03:00
56622b8ec3 Merge pull request #73709 from vonagam/fix-error-message-unfound-type
GDScript: Fix error message for unfound type
2023-02-21 23:36:29 +01:00
d4bec5855e Merge pull request #73705 from anvilfolk/doublewoopsie
Added check for null objects in gdscript typed assign.
2023-02-21 23:36:06 +01:00
49c1902a04 Merge pull request #73689 from vnen/gdscript-fix-inheritance-native-class
GDScript: Fix setting native type with script inheritance
2023-02-21 23:35:18 +01:00
2a08739f30 GDScript: Fix error message for unfound type 2023-02-21 23:00:29 +02:00
9ddf482a06 Added check for null objects in gdscript typed assign. 2023-02-21 15:29:07 -05:00
253396ba39 Merge pull request #73693 from vnen/gdscript-fix-script-signature-check
GDScript: Fix override signature check of script inheritance
2023-02-21 21:19:39 +01:00
31726fa945 Merge pull request #73680 from vnen/gdscript-div-by-zero-crash-fix
GDScript: Avoid validated division operation to test for zero
2023-02-21 21:19:15 +01:00
1731010774 GDScript: Fix override signature check of script inheritance
Avoid treating the super class as a meta type for signature check, since
it is looking at the instance level for that.
2023-02-21 14:37:08 -03:00
d076c76551 GDScript: Fix setting native type with script inheritance
Sometimes the inheritance tree is compiled out of order and the base
don't have yet a native type set. This is now changed to not rely on the
base script but use the native type set in the datatype, which is
already resolved by the analyzer.
2023-02-21 14:09:10 -03:00
0866e6af2d GDScript: Avoid validated division operation to test for zero
The validated operations for integer division and modulo do not check
for division by zero. This avoids validated operation in these cases to
make sure the check is performed and avoid crashing the engine.
2023-02-21 11:12:45 -03:00
91b93465d5 GDScript: Fix crash when autoload script can't be found 2023-02-21 10:45:24 -03:00