Age | Commit message (Collapse) | Author |
|
Inheriting from virtual class no longer causes the engine to crash.
|
|
prints an error instead.
Co-authored-by: Hein-Pieter van Braam <hp@tmm.cx>
|
|
Fix -Wsign-compare warnings.
|
|
I decided to modify code in a defensive way. Ideally functions
like size() or length() should return an unsigned type.
|
|
Also, initialize elements of PoolArrays when resizing them in the editor.
Fixes #26066.
|
|
Fix support for optional parameters in setters
|
|
Fix warnings seen with -Wignored-qualifiers.
|
|
Fix all -Wtype-limits warnings.
|
|
|
|
|
|
|
|
Fixes #25316.
|
|
They had been reserved for future implementation, but we now have the
`match` CF keyword which does the same and more.
According to @reduz `do` was even added by mistake when copying from
the shader language parser, it was never intended to add support for
`do`... `while` loops, as the syntax would be awkward in GDScript,
and the added sugar is not worth it.
Fixes #25787.
|
|
Add a maximum recusion depth to _guess_expression_type
|
|
Fix exported property values being lost if base GDScript fails to parse
|
|
|
|
Using codespell 1.14.0.
Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
doubleclick
lod
nd
numer
que
te
unselect
EOF
$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
|
|
Also drop some unused files.
Renamed:
- `core/dvector.h` -> `pool_vector.h`
- `core/io/resource_import.h` -> `resource_importer.h`
- `core/sort.h` -> `sort_array.h`
- `core/string_db.h` -> `string_name.h`
Dropped:
- `core/allocators.h`
- `core/os/shell.h`
- `core/variant_construct_string.cpp`
|
|
Fix many asan and ubsan reported issues
|
|
Fixed Null appearing inside export variables with type hints and no default value
|
|
Fix script class icons looking for paths at runtime
|
|
When a recursive declaration ends up in a GDScript file the
_guess_expression_type function would start looping and eventually run
out of stack space.
We now cap recusion for this function to 100 frames.
This fixes #25598
|
|
|
|
value
The default value of the type is now used to initialise it.
export(int) A
Will now have A be 0 istead of Null even though it still showed as 0 before in the inspector, fixes #25357
|
|
through call
Fixes #25505
|
|
This allows most demos to run without any ubsan or asan errors. There
are still some things in thirdpart/ and some things in AudioServer that
needs a look but this fixes a lot of issues. This should help debug less
obvious issues, hopefully.
This fixes #25217 and fixes #25218
|
|
|
|
Some construct (like match) actually depends on the second pass. This
adds some extra checks to not perform specific type-checks on release
since not all type information is available.
|
|
|
|
This is needed to create export variables from enums defined in a parent
class.
|
|
|
|
|
|
|
|
Fixes #25082, fixes #24709.
|
|
A bit more of GDScript fixes
|
|
Otherwise these checks might trigger the insertion of an empty value,
leading to crashes.
|
|
They may happen with any cyclic dependency, not only with inheritance.
|
|
|
|
Fixes export PackedScene "reset to default" throwing errors
|
|
When exporting variables from a gdscript, default values of uninitialized variables would never be set. This caused the default value to be Variant::NIL, and when a user tried to reset the variable through the editor, an error would be thrown because too few arguments would be counted(end of argument list for calls are detected by NIL values).
Fixed by simply setting default value to an empty variant of the proper type in gdscript parser.
|
|
Some classes are represented internally with an underscore prefix, so we
need to make sure we match this representation when type-checking,
otherwise the check might fail on a valid scenario.
|
|
There's always a constructor, even if implicit, especially for native
types.
Also don't check for signature match on function call, since this
information is not available in release builds.
|
|
The engine allows this already, so the parser should not fail in this
case.
|
|
A lot of information is missing on release, and the checks might take a
performance hit. Also, having GDScript more lenient on release is
usually desirable.
|
|
Guessing the type from an `is` operator should no be considered an
assigment. This would cause crashes in certain scenarios.
|
|
Fix properties being lost when reloading placeholder GDScript instance
|
|
Consistency in resource format saver/loader de-registration
|
|
Use temporary cache directory instead of editor settings directory
in order to resolve encrypted file access needed for encrypting scripts
on all platforms.
|
|
Some used 'is_valid()' checks, others not. Validity is already checked in 'unref()',
and 'remove_resource_format_*()' has an ERR_FAIL condition on 'is_null()' already
(which shouldn't happen since we're only unregistering things that we previously
registered.
Also add missing GDCLASS statement in ResourceFormatLoaderVideoStreamGDNative,
missed in #20552 which was last amended before #19501 was merged.
|
|
During reloading in `GDScriptLanguage::reload_all_scripts` a placeholder instance that must remain so is replaced with a new placeholder instance. The state is then restored by calling `ScriptInstance::set` for each property. This does not work if the script is missing the properties due to build/parse failing.
The fix for such cases is to call `placeholder_set_fallback` instead of `set` on the script instance.
I took this chance to move the `build_failed` flag from `PlaceHolderScriptInstance` to `Script`. That improves the code a lot. I also renamed it to `placeholder_fallback_enabled` which is a much better name (`build_failed` could lead to misunderstandings).
|