| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \
| | |
| | | |
GDScript: Add warnings that are set to error by default (take 2)
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Adds a list of default levels for all warning so they can be set
individually.
- Add warnings set by default to error for:
- Using `get_node()` without `@onready`.
- Using `@onready` together with `@export`.
- Inferring a static type with a Variant value.
- Overriding a native engine method.
- Adjust how annotations to ignore warnings are treated so they also
apply to method parameters.
- Clean up a bit how ignored warnings are set. There were two sets but
only one was actually being used.
- Set all warnings to the `WARN` level for tests, so they they can be
properly tested.
- Fix enum types in native methods signatures being set to `int`.
- Fix native enums being treated as Dictionary by mistake.
- Make name of native enum types use the class they are defined in, not
the direct super class of the script. This ensures they are always
equal even when coming from different sources.
- Fix error for signature mismatch that was only showing the first
default argument as having a default. Now it shows for all.
|
|/
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
|
|
| |
This reverts commit a166833bfa23a21a7bff196a85a20b014e7c1396.
This caused multiple regressions.
Needs to be redone with more testing before merge.
Fixes #72501.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Adds a list of default levels for all warning so they can be set
individually.
- Add warnings set by default to error for:
- Using `get_node()` without `@onready`.
- Using `@onready` together with `@export`.
- Inferring a static type with a Variant value.
- Overriding a native engine method.
- Adjust how annotations to ignore warnings are treated so they also
apply to method parameters.
- Clean up a bit how ignored warnings are set. There were two sets but
only one was actually being used.
- Set all warnings to the `WARN` level for tests, so they they can be
properly tested.
- Fix enum types in native methods signatures being set to `int`.
- Fix native enums being treated as Dictionary by mistake.
- Make name of native enum types use the class they are defined in, not
the direct super class of the script. This ensures they are always
equal even when coming from different sources.
- Fix error for signature mismatch that was only showing the first
default argument as having a default. Now it shows for all.
|
| |
|
|\
| |
| | |
GDScript: Allow variables in match patterns
|
| |
| |
| |
| | |
To restore an ability available in 3.x and reduce compatibility changes.
|
|/ |
|
| |
|
|\
| |
| |
| | |
GDScript: Disallow type inference with untyped initializer
|
| | |
|
|/ |
|
|\
| |
| |
| | |
GDScript: Fix some issues with assignments that involve untyped things
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
- Uniformize `.gd` unit test files indentation to tabs (where needed)
|
|\
| |
| | |
GDScript: Fix type for index subscript on constant
|
| | |
|
|/
|
|
|
|
|
| |
- Add outer class lookup test
- Add signal lookup test
Co-authored-by: Dmitrii Maganov <vonagam@gmail.com>
|
|\
| |
| | |
GDScript: Begin making constants deep, not shallow or flat
|
| | |
|
|/ |
|
| |
|
| |
|
|\
| |
| |
| | |
GDScript: Error when assigning return value of void function
|
| |
| |
| |
| |
| | |
Remove the `VOID_ASSIGNMENT` warning since those cases will be errors
now.
|
|\ \
| | |
| | |
| | | |
GDScript: Disallow return with value in void functions
|
| |/ |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To guarantee polymorphism, a method signature must be compatible with
the parent. This checks if:
1. Return type is the same.
2. The subclass method takes at least the same amount of parameters.
3. The matching parameters have the same type.
4. If the subclass takes more parameters, all of the extra ones have a
default value.
5. If the superclass has default values, so must have the subclass.
There's a few test cases to ensure this holds up.
|
|
|
|
|
|
|
|
|
|
| |
This makes sure that assigning values to enum-typed variables are
consistent. Same enum is always valid, different enum is always
invalid (without casting) and assigning `int` creates a warning
if there is no casting.
There are new test cases to ensure this behavior doesn't break in
the future.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Inline getters & setters are now FunctionNodes.
Their names are set in the parser, not in the compiler.
GDScript-Analyzer will now run through getter and setter.
Also report wrong type or signature errors regarding getset properties.
Added GDScript tests for getters and setters.
#53102
|
| |
|
|
|
|
| |
This also fixes a typo in the `bitwise_float_right_operand.gd` test.
|
|
|
|
|
| |
Which is useful when the key isn't a valid identifier, such as keys with
spaces or numeric keys.
|
|
This also ignores `.out` files in the file format static checks.
|