Rémi Verschelde
98b81ad35c
Merge pull request #53479 from vnen/gdscript-subscript-object-self
2021-10-06 19:48:23 +02:00
George Marques
1f55bd190c
GDScript: Allow subscript on self and object types
2021-10-06 12:01:34 -03:00
George Marques
6bdb28f5e4
GDScript: Avoid hard errors on inferred types
...
Since inference isn't always correct, they are now treated as unsafe
instead of errors.
This also removes inferred type when a variable is reassigned. Since
it's not aware of branching, the types might become invalid in a later
context.
2021-10-06 11:42:19 -03:00
George Marques
d6c799006a
GDScript: Make all warnings enabled in test generation
...
The test generation doesn't initialize the language (since it's already
initialized in main), but it still needs the warning enabled so it
matches the actual tests.
2021-10-06 11:39:00 -03:00
George Marques
84956fee4b
GDScript: Fix member assignment with operation
...
It was wrongly updating the assigned value with the result of the
operation.
2021-10-04 14:09:54 -03:00
Lightning_A
c63b18507d
Use range iterators for `Map`
2021-09-30 15:09:12 -06:00
Rémi Verschelde
27d4e2f09f
Merge pull request #53216 from vnen/gdscript-builtin-type-not-id
2021-09-29 17:04:24 +02:00
George Marques
72c07708e8
GDScript: Don't allow builtin type names as identifiers
2021-09-29 11:23:16 -03:00
George Marques
991f4d8527
GDScript: Fix assignment with operation for properties
2021-09-29 10:54:16 -03:00
Rémi Verschelde
679f70c1e1
Merge pull request #52906 from vnen/gdscript-show-error-on-yield
2021-09-21 20:36:39 +02:00
Rémi Verschelde
b3b4860d2e
Merge pull request #52905 from vnen/gdscript-single-line-declaration
2021-09-21 20:35:36 +02:00
George Marques
262d6c6bef
GDScript: Show specific error when "yield" is used
...
To help people porting code, it gives a hint to use "await" instead of a
generic error.
2021-09-21 14:38:14 -03:00
George Marques
e5ebc9710d
GDScript: Allow classes declaration to be done in single line
...
Incidentally, allow multiple statements in single line functions when
using semicolon as a terminator.
2021-09-21 14:14:46 -03:00
George Marques
bab0afc821
GDScript: Allow multiple lines in signal parameters declaration
2021-09-21 13:40:39 -03:00
Rémi Verschelde
82c12060b2
Merge pull request #52718 from Calinou/gdscript-add-integration-tests-2
2021-09-21 14:13:24 +02:00
Rémi Verschelde
424ddcba37
Merge pull request #52792 from vnen/gdscript-subscript-missing-index
2021-09-17 20:16:29 +02:00
Rémi Verschelde
7762e8b1c1
Merge pull request #52788 from vnen/gdscript-compare-with-null
2021-09-17 19:35:55 +02:00
George Marques
651319de11
GDScript: Properly catch error when missing index in subscript
2021-09-17 14:31:51 -03:00
George Marques
455e142d37
Allow comparing equality between builtin types and null
2021-09-17 12:33:52 -03:00
George Marques
4e69341c01
GDScript: Avoid inferred types from giving hard errors
2021-09-17 11:52:30 -03:00
Hugo Locurcio
c6ca09dc6f
Add more integration tests to the GDScript test suite
...
This also fixes a typo in the `bitwise_float_right_operand.gd` test.
2021-09-15 19:57:39 +02:00
Rémi Verschelde
a4187c9235
Merge pull request #52706 from vnen/gdscript-ternary-operator-crash
...
GDScript: Show error when missing expression after ternary else
2021-09-15 17:20:52 +02:00
George Marques
107af38fd1
GDScript: Show error when missing expression after ternary else
2021-09-15 11:43:36 -03:00
George Marques
d49046938a
GDScript: Show error on unary operators without argument
2021-09-15 11:08:59 -03:00
George Marques
5d31ce4b16
GDScript: Allow string keys on Lua-style dictionaries
...
Which is useful when the key isn't a valid identifier, such as keys with
spaces or numeric keys.
2021-09-15 09:56:24 -03:00
Hugo Locurcio
c0083c0f90
Add dozens of new integration tests to the GDScript test suite
...
This also ignores `.out` files in the file format static checks.
2021-09-14 18:42:08 +02:00
ThreeRhinosInAnElephantCostume
2c71134aa4
Fix an undefined behaviour
2021-09-13 22:59:28 +02:00
George Marques
e9186cfebf
Fix GDScript test cases
2021-09-13 15:02:01 -03:00
Rémi Verschelde
0c2ab55a58
Merge pull request #52100 from vnen/gdscript-access-outer-constants
...
GDScript: Allow access to outer constant and enum values
2021-09-13 18:04:35 +02:00
Rémi Verschelde
4059cf2f02
Merge pull request #52068 from ThreeRhinosInAnElephantCostume/fixgdscript
...
Fix parse error on statement-less files with only newlines, add a warning for empty files.
2021-09-13 17:30:31 +02:00
ThreeRhinosInAnElephantCostume
e99730340b
Fix error on parsing statement-less GDScript files,
...
add an empty file warning,
add relevant tests.
2021-09-11 20:38:15 +02:00
ZuBsPaCe
1d1aa7a02f
GDScript: Removed spurious UNASSIGNED_VARIABLE warning for locals
...
Variable->assignment needs to be incremented when assigned a value.
Also fixed and improved unit test 'variable_declaration.gd'.
Fixes #52551
2021-09-10 22:26:50 +02:00
kobewi
c7452a9940
Fix crash with consecutive commas in Dictionary
2021-09-10 15:38:24 +02:00
George Marques
1234c2bdd9
Merge pull request #52081 from ThreeRhinosInAnElephantCostume/fixmatchfreeze
...
Fix gdscript pattern matching expressions
2021-09-10 09:28:18 -03:00
ThreeRhinosInAnElephantCostume
15ccd83ada
Added tests for expression matching
2021-09-03 06:59:13 +02:00
Max Hilbrunner
5d2c4faa89
Merge pull request #52164 from mhilbrunner/gd-style-fixup
...
GDScript test style fix
2021-08-28 20:16:17 +02:00
K. S. Ernest (iFire) Lee
d04aa9a114
Merge pull request #52122 from V-Sekai/autoload_list
...
Use sorted map for autoloads in ProjectSettings to preserve order.
2021-08-27 14:41:40 -07:00
Max Hilbrunner
f126634434
GDScript test style fix
2021-08-27 21:11:46 +02:00
Max Hilbrunner
4e67e9bca6
Merge pull request #52090 from balloonpopper/bug52060
...
Correct null and boolean values being capitalised by the str command
2021-08-27 21:05:47 +02:00
Hugo Locurcio
33773a24dc
Merge pull request #52105 from ldmnt/master
2021-08-27 19:28:59 +02:00
Lyuma
31f790299c
Use OrderedHashMap for autoloads to preserve order
2021-08-26 21:55:26 -07:00
Balloonpopper
4fae7ae9dc
Correct null and boolean values being capitalised by the str command
2021-08-26 17:11:34 +10:00
Louis Dumont
79578a5625
Fixed crash when parsing an empty assignment.
...
Resolves #51620 .
2021-08-25 18:48:08 +02:00
Hugo Locurcio
9c2ec6e697
Add a README to link to the GDScript integration tests documentation
...
This makes the documentation about creating and running GDScript
integration tests more discoverable.
2021-08-25 16:51:28 +02:00
George Marques
4918df4527
GDScript: Allow access to outer constant and enum values
2021-08-24 14:45:51 -03:00
George Marques
1c8b076502
GDScript: Fix calling builtin static functions
2021-08-18 18:58:41 -03:00
George Marques
2ba4ee9198
GDScript: Fix inner classes and preloaded scripts as types
2021-08-18 18:56:21 -03:00
Paulb23
bcfc591f86
Reorganise text editor settings
2021-08-16 17:18:49 +01:00
Aaron Franke
4e6efd1b07
Use C++ iterators for Lists in many situations
2021-07-23 17:38:28 -04:00
Lightning_A
e28fd07b2b
Rename `instance()`->`instantiate()` when it's a verb
2021-06-19 20:49:18 -06:00