virtualx-engine/modules/gdscript/tests/scripts
20kdc 24181d1055
GDScript: Adjust STATIC_CALLED_ON_INSTANCE warning to not default to the native type, and to not trigger on self-calls
Not defaulting to the native type rationale:

Defaulting to the native type is less than useful, as:

* There are very few native types that are extensible and have static methods.
* Defaulting to the native type does not account for a method being script-defined.

While the "real fix" would be to carefully track the source of the method, the get_function_signature method is already complicated enough.

This will at least ensure the resulting code should always be valid.

Not triggering on self-calls rationale:

Found in PR comment https://github.com/godotengine/godot/pull/85918#issuecomment-1935864459

```
static func example():
	pass

func example2():
	example() # self-call on static function
```

Disabling this warning on self-calls is:

* Consistent with other languages
* Important for anonymous classes (where the output code is unusable)
2024-03-01 17:14:59 +03:00
..
analyzer Merge pull request #82122 from dalexeev/gds-add-export-hidden-annotation 2024-02-27 21:22:49 +01:00
completion/get_node Allow specifying a scene in completion tests 2024-01-08 22:38:41 +01:00
lsp Add unit test runner for autocompletion 2024-01-05 17:49:51 +01:00
parser GDScript: Adjust STATIC_CALLED_ON_INSTANCE warning to not default to the native type, and to not trigger on self-calls 2024-03-01 17:14:59 +03:00
runtime Core: Add Callable.create static method for Variant callables 2024-02-29 10:45:00 +03:00
.gitignore Add runner for GDScript testing 2021-04-08 09:34:59 -03:00
project.godot Add unit test runner for autocompletion 2024-01-05 17:49:51 +01:00
utils.notest.gd GDScript: Add @export_storage annotation 2023-12-19 20:56:30 +03:00