You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/classes/ProjectSettings.xml
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -546,7 +546,10 @@
546
546
When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when the [code]@onready[/code] annotation is used together with the [code]@export[/code] annotation, since it may not behave as expected.
When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when a method tries to override the one that is not annotated by [code]@virtual[/code] in the super class, since such behavior will lead to unexpected and unsafe behaviors, unless you know what you are doing.
549
+
When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when a method tries to override the one that is not annotated by [code]@virtual[/code] from the base class, since such behavior will lead to unexpected and unsafe behaviors, unless you know what you are doing.
When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when a method tries to override the one annotated by [code]@virtual[/code] from the base class, without an explicit annotation [code]@override[/code].
550
553
</member>
551
554
<membername="debug/gdscript/warnings/property_used_as_function"type="int"setter=""getter=""default="1"deprecated="This warning is never produced. Instead, an error is generated if the expression type is known at compile time.">
552
555
When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when using a property as if it is a function.
returnvformat(R"*(The method "%s()" overrides a non-virtual method from the base class. This may cause unexpected and unsafe behaviors.)*", symbols[0]);
168
+
case OVERRIDE_WITHOUT_OVERRIDE_ANNOATION:
169
+
CHECK_SYMBOLS(1);
170
+
returnvformat(R"*(The method "%s()" overrides a virtual method from the base class without the "@override" annotation. Annotating the method with the annotation can better help you understand and clarify the code structure.)*", symbols[0]);
168
171
#ifndef DISABLE_DEPRECATED
169
172
// Never produced. These warnings migrated from 3.x by mistake.
170
173
case PROPERTY_USED_AS_FUNCTION: // There is already an error.
Copy file name to clipboardExpand all lines: modules/gdscript/gdscript_warning.h
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -90,6 +90,7 @@ class GDScriptWarning {
90
90
GET_NODE_DEFAULT_WITHOUT_ONREADY, // A class variable uses `get_node()` (or the `$` notation) as its default value, but does not use the @onready annotation.
91
91
ONREADY_WITH_EXPORT, // The `@onready` annotation will set the value after `@export` which is likely not intended.
92
92
OVERRIDE_NON_VIRTUAL_METHOD, // The class method overrides a non-virtual one, which would cause potential problems.
93
+
OVERRIDE_WITHOUT_OVERRIDE_ANNOATION, // The class method overrides a virtual one without the `@override` annotation.
93
94
#ifndef DISABLE_DEPRECATED
94
95
PROPERTY_USED_AS_FUNCTION, // Function not found, but there's a property with the same name.
95
96
CONSTANT_USED_AS_FUNCTION, // Function not found, but there's a constant with the same name.
@@ -148,6 +149,7 @@ class GDScriptWarning {
148
149
ERROR, // GET_NODE_DEFAULT_WITHOUT_ONREADY // May not work as expected.
149
150
ERROR, // ONREADY_WITH_EXPORT // May not work as expected.
Copy file name to clipboardExpand all lines: modules/gdscript/tests/scripts/analyzer/features/function_match_parent_signature_with_default_dict_void.gd
0 commit comments