godot/modules/gdscript/tests/scripts/parser/warnings
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
..
assert_always_true.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
assert_always_true.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
confusable_identifier.gd GDScript: Be more lenient with identifiers 2023-02-09 11:19:05 -03:00
confusable_identifier.out GDScript: Be more lenient with identifiers 2023-02-09 11:19:05 -03:00
deprecated_operators.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
deprecated_operators.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
empty_file.notest.gd
empty_file.notest.out
empty_file_comment.notest.gd
empty_file_comment.notest.out
empty_file_newline.notest.gd
empty_file_newline.notest.out
empty_file_newline_comment.notest.gd
empty_file_newline_comment.notest.out
enum_assign_int_without_casting.gd GDScript: Consolidate behavior for assigning enum types 2022-02-03 13:32:16 -03:00
enum_assign_int_without_casting.out GDScript: Fix constant conversions 2023-01-29 00:01:53 +02:00
incompatible_ternary.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
incompatible_ternary.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
integer_division.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
integer_division.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
match_default_not_at_end.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
match_default_not_at_end.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
narrowing_conversion.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
narrowing_conversion.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
return_value_discarded.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
return_value_discarded.out GDScript: Reorganize and unify warnings 2023-04-28 18:25:11 +03:00
shadowed_constant.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
shadowed_constant.out GDScript: Reorganize and unify warnings 2023-04-28 18:25:11 +03:00
shadowed_global_identifier.gd Allow using built-in names for variables, push warnings instead 2021-11-13 21:47:24 +03:00
shadowed_global_identifier.out GDScript: Reorganize and unify warnings 2023-04-28 18:25:11 +03:00
shadowed_variable_class.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
shadowed_variable_class.out GDScript: Reorganize and unify warnings 2023-04-28 18:25:11 +03:00
shadowed_variable_function.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
shadowed_variable_function.out GDScript: Reorganize and unify warnings 2023-04-28 18:25:11 +03:00
standalone_expression.gd GDScript: Allow strings as multiline comments 2023-02-09 10:16:00 -03:00
standalone_expression.out GDScript: Allow strings as multiline comments 2023-02-09 10:16:00 -03:00
static_called_on_instance.gd 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
static_called_on_instance.out 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
unassigned_variable.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
unassigned_variable.out GDScript: Reorganize and unify warnings 2023-04-28 18:25:11 +03:00
unassigned_variable_op_assign.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
unassigned_variable_op_assign.out GDScript: Reorganize and unify warnings 2023-04-28 18:25:11 +03:00
unreachable_code_after_return.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
unreachable_code_after_return.out GDScript: Reorganize and unify warnings 2023-04-28 18:25:11 +03:00
unreachable_code_after_return_bug_55154.gd Fix 'unreachable-code' false-positive, fixes #55154 2021-11-21 15:53:21 +01:00
unreachable_code_after_return_bug_55154.out Fix 'unreachable-code' false-positive, fixes #55154 2021-11-21 15:53:21 +01:00
unused_argument.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
unused_argument.out GDScript: Reorganize and unify warnings 2023-04-28 18:25:11 +03:00
unused_variable.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
unused_variable.out GDScript: Reorganize and unify warnings 2023-04-28 18:25:11 +03:00