Commit Graph

153 Commits

Author SHA1 Message Date
df952a32f8 Merge pull request #71107 from vnen/gdscript-fix-nil-address-assign
GDScript: Don't use the NIL address to hold return value of functions
2023-01-09 14:22:16 +01:00
c2f7c2d31a Merge pull request #70655 from vonagam/fix-assert-multiline
GDScript: Fix multiline and trailing comma for assert
2023-01-09 14:19:37 +01:00
a1309f1f42 GDScript: Allow using await on calls to void functions 2023-01-09 09:55:05 -03:00
a3816434a6 GDScript: Don't use the NIL address to hold return value of functions
This prevents that the NIL address is filled with another value, which
causes problems for some instructions that read from NIL.
2023-01-09 09:20:18 -03:00
71f7c8a9d3 GDScript: Fix multiline and trailing comma for assert 2023-01-08 20:18:46 +02:00
532ffc30bd GDScript: Fix typing of lambda functions 2023-01-06 16:38:22 +02:00
10e364bf43 GDScript: Fix array as default value for parameter 2023-01-06 06:25:55 +02:00
a1d06749f1 Unify typing of variables, constants and parameters in GDScript 2023-01-06 01:10:04 +02:00
8203e09330 Merge pull request #70859 from vonagam/fix-preload-native-type
GDScript: Fix wrong native type for preloaded class
2023-01-03 23:22:23 +01:00
4e360ac612 Merge pull request #70702 from vnen/gdscript-error-on-assign-void
GDScript: Error when assigning return value of void function
2023-01-03 12:23:00 +01:00
e4c1103af4 Merge pull request #70656 from vonagam/fix-void-returns
GDScript: Disallow return with value in void functions
2023-01-03 12:20:33 +01:00
961b4ac5f5 GDScript: Fix wrong native type for preloaded class 2023-01-03 05:45:06 +02:00
8a98110e3e Merge pull request #62688 from cdemirer/assignments-and-types
Fixes https://github.com/godotengine/godot/issues/62650
2022-12-30 16:38:35 -03:00
bc739a4687 GDScript: Make using return of void function an error
Remove the `VOID_ASSIGNMENT` warning since those cases will be errors
now.
2022-12-30 13:35:38 -03:00
33afa82fb0 Merge pull request #70613 from vonagam/fix-enum-as-constant
Fixes https://github.com/godotengine/godot/issues/54018
Fixes https://github.com/godotengine/godot/issues/70213
Fixes https://github.com/godotengine/godot/issues/70495
2022-12-30 12:10:50 -03:00
0c15844551 GDScript: Error when assigning return value of void function
This also makes built-in method calls empty the return value when the
method is void, to avoid keeping returning a garbage value in such case.
2022-12-30 12:08:58 -03:00
9507f65e25 GDScript: Disallow return with value in void functions 2022-12-29 03:06:13 +02:00
b6aa4840d8 Fix usage of Enum as constant 2022-12-28 23:04:40 +02:00
f67aa3e46d GDScript: Fix return type of constructor call for extending class 2022-12-27 23:02:12 +02:00
bbb21c3fd5 Fix type adjustment skipped when value is considered both not hard and not variant 2022-12-25 17:11:30 +03:00
ae4c025da9 Merge pull request #69991 from rune-scape/cast-type
GDScript: Fix cast producing null
2022-12-23 09:22:21 +01:00
edfa1e8665 Merge pull request #70220 from adamscott/fix-external-enum
Fix external enums not assignable as constants
2022-12-23 09:20:50 +01:00
e1657bd2a7 Merge pull request #70440 from rune-scape/null-again
Fix GDScript analyzer null literal
2022-12-22 16:02:19 +01:00
3228fdb88a Fix GDScript analyzer null literal 2022-12-22 06:02:34 -05:00
d93dbab054 Add MethodInfo to signal datatype 2022-12-21 22:49:51 -05:00
7fc814f697 Fix external enums not assignable as constants
- Add external enums test
- Rename external inner class test
- Clean up `GDScriptAnalyzer::reduce_identifier_from_base` class
  behavior
2022-12-17 17:59:38 -05:00
1bbb2b4159 Fix outer class lookup 2022-12-17 17:57:00 -05:00
2fefcf7329 Fix inner class constant assignment 2022-12-17 12:03:03 -05:00
213c94b42f Fix enum value regression 2022-12-16 22:48:25 -05:00
6debf86d51 Merge pull request #69471 from rune-scape/rune-out-of-order
GDScript: Out of order member resolution
2022-12-15 07:56:23 +01:00
2dfc6d5b69 GDScript: Allow out of order member resolution 2022-12-14 21:44:05 -05:00
7d0d6aa16f GDScript: Fix cast producing null 2022-12-12 19:57:26 -05:00
08449ab16e Fix String type compatibility being too permissive 2022-12-12 07:27:41 -05:00
65a49bad5a Fix constant base typing in extended GDScript class 2022-12-10 13:39:45 -05:00
907298d673 Merge pull request #68747 from rune-scape/rune-stringname-unification
GDScript: Unify StringName and String
2022-12-09 18:06:48 +01:00
e79be6ce07 Unify String and StringName 2022-12-05 21:46:47 -05:00
97280279ee Fix incomplete shadowing of member properties by parameters 2022-12-06 00:22:56 +02:00
d1e4146462 Improve parent signature error 2022-12-01 15:16:16 +01:00
5bdd883dfd change RETURN_VALUE_DISCARDED GDScript warn text
changed RETURN_VALUE_DISCARDED GDscript warning text to mention how the return value of a function is discarded; update GDScript parser warning test to include new warning text.
2022-11-21 15:04:04 -06:00
80b3813b15 Merge pull request #67714 from adamscott/fix-preload-cyclic-references-part2
Fix cyclic references in GDScript 2.0
2022-11-18 23:08:01 +01:00
5704055d30 Fix cyclic references in GDScript 2.0 2022-11-18 16:41:31 -05:00
13be0ab733 Fix ability to overload "script" variable 2022-11-17 17:21:12 -05:00
bce6f1792e GDScript compiler subclass bugfixes 2022-11-13 02:29:21 -08:00
7eb44fa47d Merge pull request #68125 from kleonc/range-fix-single-arg-optimized-type-mismatch
[GDScript] Fix type mismatch in optimized single arg `range`
2022-11-02 14:18:24 +01:00
c268e3a235 GDScript Fix type mismatch in optimized single arg range 2022-11-02 13:20:47 +01:00
d7d130295e Support for checking that Projection is(not) null 2022-11-01 20:49:52 +01:00
0a51bb4ca5 Add STATIC_CALLED_ON_INSTANCE warning to highlight
when static functions are called directly from objects
2022-10-14 10:43:42 -07:00
be1e9acb7c Implement RETURN_VALUE_DISCARDED warning in GDscript 2022-10-13 11:56:45 -07:00
6afbf0bd5a Improve dictionary printing to avoid confusion with arrays
- Add leading and trailing spaces within dictionaries, as the `{}`
  characters are hard to distinguish from `[]` on some fonts.
  This is especially helpful with empty arrays and dictionaries.
2022-10-04 20:33:40 +02:00
291d3aaabe Improve null and object printing to avoid confusion with arrays
- Use different syntax for object printing to avoid confusion with arrays.
- Print null as `<null>` to avoid confusion with a string `"null"`.
- Display `<empty>` in editor resource pickers to avoid confusion
  with array-based properties.
2022-08-31 15:31:49 +02:00