552 Commits

Author SHA1 Message Date
Danil Alexeev 30f2a30f9b GDScript: Preserve compatibility for untyped return of _get_property_list() 2026-05-05 10:47:07 +03:00
Thaddeus Crews e998e94ff1 Merge pull request #118002 from dalexeev/gds-warn-confusable-temp-mod
GDScript: Add `CONFUSABLE_TEMPORARY_MODIFICATION` warning
2026-04-21 08:48:12 -05:00
Danil Alexeev 7db019d44d GDScript: Improve PROPERTY_HINT_{ARRAY,DICTIONARY}_TYPE handling 2026-04-09 13:39:57 +03:00
Danil Alexeev 9a78c8bd31 GDScript: Group similar analyzer/runtime error tests into single files 2026-04-02 15:02:10 +03:00
Danil Alexeev 080e1d8d1b GDScript: Add CONFUSABLE_TEMPORARY_MODIFICATION warning 2026-03-30 17:45:53 +03:00
Danil Alexeev d0eb19359e GDScript: Fix compiler generates incorrect bytecode for conversion return 2026-03-18 11:44:20 +03:00
Danil Alexeev 566d86d081 GDScript: Fix return type checking for inferred function type 2026-03-07 12:52:31 +03:00
Thaddeus Crews 1e12317895 Merge pull request #115646 from Ivorforce/list-explicit-copy
Change `List` copy constructor from implicit to explicit.
2026-02-16 15:02:34 -06:00
Leonard Pop 058a46f154 Inherit parent method return types for untyped overrides 2026-02-02 21:34:37 +02:00
Lukas Tenbrink 7072a9a874 Change List copy constructor from implicit to explicit. 2026-01-30 18:58:42 +01:00
Thaddeus Crews 0f266c4f8e Merge pull request #110523 from StamLord/pattern-guard-warning-fix
Pattern guard warning fix
2026-01-29 12:11:15 -06:00
Thaddeus Crews 982eaef37d Merge pull request #115278 from MattiaZir/fix-while-null-node-condition
Parser: Fix "trying to resolve type of null node" when missing condition.
2026-01-26 13:14:25 -06:00
Mattia Zirpoli 372c522ce1 Parser: Fix "trying to resolve type of null node" when missing condition. 2026-01-26 18:14:50 +01:00
Danil Alexeev 6d06b3a7d6 GDScript: Improve evaluation of constant expressions with arrays/dictionaries 2026-01-12 11:59:38 +03:00
George Marques 501c5b0900 GDScript: Make check for exposed classes more consistent
Some places were already checking if classes from ClassDB were exposed,
while others didn't. This makes the check more consistent to avoid
disparities which can lead to crashes.
2025-11-25 12:24:18 -03:00
Thaddeus Crews ae9732139a Merge pull request #109433 from KoBeWi/hastension
Add `has_extension()` method to String
2025-10-31 09:23:30 -05:00
Lukas Tenbrink d2ee378d1c Remove VariantHasher and VariantComparator in favour of specializing HashMapHasherDefault and HashMapComparatorDefault. 2025-10-07 13:47:39 +02:00
Thaddeus Crews b9730c0b2e Merge pull request #110240 from westenral/add_int_division_warnings
Add checks for integer vectors for integer division warning
2025-09-30 20:10:33 -05:00
Thaddeus Crews 8bc1dd63f4 Merge pull request #107936 from mihe/missing-await-warning
Add opt-in GDScript warning for when calling coroutine without `await`
2025-09-30 18:35:05 -05:00
StamLord ef98bdd502 Resolved guard pattern warning 2025-09-15 21:01:47 +03:00
westenral 565e1aaeb9 Add checks for integer vectors for integer division warning
Remove warnings for invalid Vectori combinations

Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
2025-09-04 10:13:05 -04:00
Aaron Franke b73597292b Improve error messages for lambda functions without a body 2025-08-18 06:29:20 -07:00
kobewi a33ae0be0e Add has_extension() method to String 2025-08-12 13:15:16 +02:00
George Marques 38f8643b00 GDScript: Properly detect native class on static call optimization 2025-07-25 09:17:39 -03:00
A Thousand Ships f11aff3841 Editor: Restructure editor code
Moving various editor files into sub folders to reduce clutter
2025-07-04 18:18:22 +02:00
Mikael Hermansson a3e58a385f Add opt-in GDScript warning for when calling coroutine without await 2025-06-27 20:24:41 +02:00
Aaron Franke 1085200f51 GDScript: Replace abstract keyword with @abstract annotation
Co-authored-by: Danil Alexeev <dalexeev12@yandex.ru>
2025-06-23 12:24:45 -07:00
Thaddeus Crews 0f05e91889 Merge pull request #82808 from dalexeev/gds-vararg
GDScript: Add support for variadic functions
2025-06-09 17:08:48 -05:00
Danil Alexeev a13fbc6e3e GDScript: Optimize non-constant for-range 2025-06-09 22:04:39 +03:00
Danil Alexeev ee121ef80e GDScript: Add support for variadic functions 2025-06-09 21:53:05 +03:00
Danil Alexeev a7cf2069d5 GDScript: Add abstract methods
Co-authored-by: ryanabx <ryanbrue@hotmail.com>
2025-06-09 20:11:58 +03:00
Thaddeus Crews d237e31a89 Style: Remove redundant DEBUG_METHODS_ENABLED
• Replaced with functionally identical and far more ubiquitous `DEBUG_ENABLED`
2025-05-15 13:09:41 -05:00
Thaddeus Crews b59d6bea4f Merge pull request #67777 from aaronfranke/virtually-annotated
Add a keyword for abstract classes in GDScript
2025-05-13 16:22:16 -05:00
Malcolm Anderson d8db03e31a Fix a few GDScript warning messages for grammar and consistency
Regenerate test results

Improve warning message for `INT_AS_ENUM_WITHOUT_CAST`

Improve `REDUNDANT_AWAIT` message and regenerate tests

Allow warning message for UNASSIGNED_VARIABLE_OP_ASSIGN to display specific operator

Remove "being" from some messages to make them consistent and clearer

Update expected test results

Use Variant::get_operator_name for determining string representation of operator instead of big switch-case

Update tests

Update modules/gdscript/gdscript_warning.cpp

Co-authored-by: Danil Alexeev <dalexeev12@yandex.ru>

Update tests... again
2025-05-06 20:28:01 -07:00
Aaron Franke 067704f1cd Add a keyword for abstract classes in GDScript
Co-authored-by: Danil Alexeev <danil@alexeev.xyz>
2025-05-02 00:03:04 -07:00
lawnjelly f8f350a32a Add GLOBAL_GET cached macros.
GLOBAL_GET is an expensive operation which should not be used each frame / tick.
This PR adds macros which do a cheaper revision check, and only call the expensive GLOBAL_GET when project settings have changed.

Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2025-04-30 15:08:50 +01:00
Lukas Tenbrink bfdb0f0ecf Fix various sanitizer issues. 2025-04-28 15:23:35 +02:00
Thaddeus Crews 5d697c31c1 Merge pull request #78837 from dalexeev/gds-const-array-and-dict-constructors
GDScript: Add constant `Array` and `Dictionary` constructors
2025-04-24 09:09:29 -05:00
Thaddeus Crews 0d267e7b1e Core: Add dedicated BitField template 2025-04-11 11:53:26 -05:00
HolonProduction e7487263ad Autocompletion: Don't add parenthesis if Callable is expected 2025-04-10 18:40:32 +02:00
Yufeng Ying 7a1a970c25 size() <= 0 and size() < 1. 2025-04-02 19:18:44 +08:00
Danil Alexeev 7721e13a92 GDScript: Add constant Array and Dictionary constructors 2025-03-31 21:31:34 +03:00
A Thousand Ships d9721954e6 [Core] Use Vector for MethodInfo::arguments 2025-03-10 13:57:53 +01:00
A Thousand Ships 466590d0ec Use get_slicec instead of get_slice for single character splitters 2025-03-08 20:36:37 +01:00
Malcolm Anderson 8e8f93cf0c Display correct symbol in warning when unique name is used without @onready annotation
Add tests for `GET_NODE_DEFAULT_WITHOUT_ONREADY` warning with unique nodes

Small modifications to tests
2025-02-06 10:49:08 -08:00
kobewi c29e9e9b29 Ensure path for shallow scripts 2025-01-11 21:20:31 +01:00
Danil Alexeev cd918ff470 GDScript: Remove RENAMED_IN_GODOT_4_HINT from GDScriptWarning::Code enum 2025-01-09 21:07:41 +03:00
Aarni Koskela f134769506 Fix various typos
* Add TODO notes for typos that should be fixed for 5.0

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2025-01-08 14:47:42 +02:00
A Thousand Ships a1846b27ea Improve use of Ref.is_null/valid
Use `is_null` over `!is_valid` and vice versa.
2024-12-23 16:35:02 -05:00
Yufeng Ying 33817b186f Remove unused header in drivers and modules.
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>
2024-12-24 00:40:47 +08:00