summaryrefslogtreecommitdiffstats
path: root/modules/gdscript
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript')
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp97
-rw-r--r--modules/gdscript/gdscript_byte_codegen.cpp21
-rw-r--r--modules/gdscript/gdscript_editor.cpp21
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_builtin_access.gd2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_builtin_access.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_global_access.gd2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_global_access.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_native_access.gd2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_native_access.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/global_builtin_and_native_enums.gd28
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/global_builtin_and_native_enums.out25
-rw-r--r--modules/gdscript/tests/scripts/completion/assignment_options/enum_attribute.cfg2
-rw-r--r--modules/gdscript/tests/scripts/completion/assignment_options/enum_attribute_identifier.cfg2
-rw-r--r--modules/gdscript/tests/scripts/completion/common/identifiers_in_call.cfg8
-rw-r--r--modules/gdscript/tests/scripts/completion/common/identifiers_in_function_body.cfg8
-rw-r--r--modules/gdscript/tests/scripts/completion/common/identifiers_in_unclosed_call.cfg8
-rw-r--r--modules/gdscript/tests/scripts/completion/common/no_completion_in_string.cfg10
-rw-r--r--modules/gdscript/tests/scripts/completion/common/self.cfg8
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/literal/dollar.cfg2
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/literal/percent.cfg2
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/literal_scene/dollar_class_scene.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/literal_scene/dollar_native_scene.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/literal_scene/percent_class_scene.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/literal_scene/percent_native_scene.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/local/local.cfg2
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/local_infered/local_infered.cfg2
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/local_infered_scene/class_local_infered_scene.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/local_infered_scene/native_local_infered_scene.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/local_scene/class_local_scene.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/local_scene/native_local_scene.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/local_typehint/class_local_typehint.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/local_typehint/native_local_typehint.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene/class_local_typehint_scene.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene/native_local_typehint_scene.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene_broad/class_local_typehint_scene_broad.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene_broad/native_local_typehint_scene_broad.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene_incompatible/class_local_typehint_scene_incompatible.cfg6
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene_incompatible/native_local_typehint_scene_incompatible.cfg6
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/member/member.cfg2
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/member_infered/member_infered.cfg2
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/member_infered_scene/class_member_infered_scene.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/member_infered_scene/native_member_infered_scene.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/member_scene/class_member_scene.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/member_scene/native_member_scene.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/member_typehint/class_member_typehint.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/member_typehint/native_member_typehint.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene/class_member_typehint_scene.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene/native_member_typehint_scene.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene_broad/class_member_typehint_scene_broad.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene_broad/native_member_typehint_scene_broad.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene_incompatible/class_member_typehint_scene_incompatible.cfg6
-rw-r--r--modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene_incompatible/native_member_typehint_scene_incompatible.cfg6
-rw-r--r--modules/gdscript/tests/scripts/completion/types/local/infered.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/types/local/no_type.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/types/local/typehint.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/types/local/typehint_broad.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/types/local/typehint_incompatible.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/types/member/infered.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/types/member/no_type.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/types/member/typehint.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/types/member/typehint_broad.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/types/member/typehint_incompatible.cfg4
-rw-r--r--modules/gdscript/tests/scripts/runtime/errors/division_by_zero.gd3
-rw-r--r--modules/gdscript/tests/scripts/runtime/errors/division_by_zero.out6
-rw-r--r--modules/gdscript/tests/scripts/runtime/errors/modulo_by_zero.gd3
-rw-r--r--modules/gdscript/tests/scripts/runtime/errors/modulo_by_zero.out6
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/stringify.gd9
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/stringify.out10
68 files changed, 317 insertions, 142 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index ba0b5c35e6..edfd538527 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -171,7 +171,9 @@ static GDScriptParser::DataType make_native_enum_type(const StringName &p_enum_n
GDScriptParser::DataType type = make_enum_type(p_enum_name, native_base, p_meta);
if (p_meta) {
- type.builtin_type = Variant::NIL; // Native enum types are not Dictionaries.
+ // Native enum types are not dictionaries.
+ type.builtin_type = Variant::NIL;
+ type.is_pseudo_type = true;
}
List<StringName> enum_values;
@@ -184,10 +186,29 @@ static GDScriptParser::DataType make_native_enum_type(const StringName &p_enum_n
return type;
}
+static GDScriptParser::DataType make_builtin_enum_type(const StringName &p_enum_name, Variant::Type p_type, bool p_meta = true) {
+ GDScriptParser::DataType type = make_enum_type(p_enum_name, Variant::get_type_name(p_type), p_meta);
+ if (p_meta) {
+ // Built-in enum types are not dictionaries.
+ type.builtin_type = Variant::NIL;
+ type.is_pseudo_type = true;
+ }
+
+ List<StringName> enum_values;
+ Variant::get_enumerations_for_enum(p_type, p_enum_name, &enum_values);
+
+ for (const StringName &E : enum_values) {
+ type.enum_values[E] = Variant::get_enum_value(p_type, p_enum_name, E);
+ }
+
+ return type;
+}
+
static GDScriptParser::DataType make_global_enum_type(const StringName &p_enum_name, const StringName &p_base, bool p_meta = true) {
GDScriptParser::DataType type = make_enum_type(p_enum_name, p_base, p_meta);
if (p_meta) {
- type.builtin_type = Variant::NIL; // Native enum types are not Dictionaries.
+ // Global enum types are not dictionaries.
+ type.builtin_type = Variant::NIL;
type.is_pseudo_type = true;
}
@@ -705,8 +726,8 @@ GDScriptParser::DataType GDScriptAnalyzer::resolve_datatype(GDScriptParser::Type
if (first == SNAME("Variant")) {
if (p_type->type_chain.size() == 2) {
// May be nested enum.
- StringName enum_name = p_type->type_chain[1]->name;
- StringName qualified_name = String(first) + ENUM_SEPARATOR + String(p_type->type_chain[1]->name);
+ const StringName enum_name = p_type->type_chain[1]->name;
+ const StringName qualified_name = String(first) + ENUM_SEPARATOR + String(p_type->type_chain[1]->name);
if (CoreConstants::is_global_enum(qualified_name)) {
result = make_global_enum_type(enum_name, first, true);
return result;
@@ -721,21 +742,34 @@ GDScriptParser::DataType GDScriptAnalyzer::resolve_datatype(GDScriptParser::Type
result.kind = GDScriptParser::DataType::VARIANT;
} else if (GDScriptParser::get_builtin_type(first) < Variant::VARIANT_MAX) {
// Built-in types.
- if (p_type->type_chain.size() > 1) {
- push_error(R"(Built-in types don't contain nested types.)", p_type->type_chain[1]);
+ const Variant::Type builtin_type = GDScriptParser::get_builtin_type(first);
+
+ if (p_type->type_chain.size() == 2) {
+ // May be nested enum.
+ const StringName enum_name = p_type->type_chain[1]->name;
+ if (Variant::has_enum(builtin_type, enum_name)) {
+ result = make_builtin_enum_type(enum_name, builtin_type, true);
+ return result;
+ } else {
+ push_error(vformat(R"(Name "%s" is not a nested type of "%s".)", enum_name, first), p_type->type_chain[1]);
+ return bad_type;
+ }
+ } else if (p_type->type_chain.size() > 2) {
+ push_error(R"(Built-in types only contain enum types, which do not have nested types.)", p_type->type_chain[2]);
return bad_type;
}
+
result.kind = GDScriptParser::DataType::BUILTIN;
- result.builtin_type = GDScriptParser::get_builtin_type(first);
+ result.builtin_type = builtin_type;
- if (result.builtin_type == Variant::ARRAY) {
+ if (builtin_type == Variant::ARRAY) {
GDScriptParser::DataType container_type = type_from_metatype(resolve_datatype(p_type->get_container_type_or_null(0)));
if (container_type.kind != GDScriptParser::DataType::VARIANT) {
container_type.is_constant = false;
result.set_container_element_type(0, container_type);
}
}
- if (result.builtin_type == Variant::DICTIONARY) {
+ if (builtin_type == Variant::DICTIONARY) {
GDScriptParser::DataType key_type = type_from_metatype(resolve_datatype(p_type->get_container_type_or_null(0)));
if (key_type.kind != GDScriptParser::DataType::VARIANT) {
key_type.is_constant = false;
@@ -3972,13 +4006,36 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod
if (base.kind == GDScriptParser::DataType::BUILTIN) {
if (base.is_meta_type) {
- bool valid = true;
- Variant result = Variant::get_constant_value(base.builtin_type, name, &valid);
- if (valid) {
+ bool valid = false;
+
+ if (Variant::has_constant(base.builtin_type, name)) {
+ valid = true;
+
+ const Variant constant_value = Variant::get_constant_value(base.builtin_type, name);
+
p_identifier->is_constant = true;
- p_identifier->reduced_value = result;
- p_identifier->set_datatype(type_from_variant(result, p_identifier));
- } else if (base.is_hard_type()) {
+ p_identifier->reduced_value = constant_value;
+ p_identifier->set_datatype(type_from_variant(constant_value, p_identifier));
+ }
+
+ if (!valid) {
+ const StringName enum_name = Variant::get_enum_for_enumeration(base.builtin_type, name);
+ if (enum_name != StringName()) {
+ valid = true;
+
+ p_identifier->is_constant = true;
+ p_identifier->reduced_value = Variant::get_enum_value(base.builtin_type, enum_name, name);
+ p_identifier->set_datatype(make_builtin_enum_type(enum_name, base.builtin_type, false));
+ }
+ }
+
+ if (!valid && Variant::has_enum(base.builtin_type, name)) {
+ valid = true;
+
+ p_identifier->set_datatype(make_builtin_enum_type(name, base.builtin_type, true));
+ }
+
+ if (!valid && base.is_hard_type()) {
#ifdef SUGGEST_GODOT4_RENAMES
String rename_hint;
if (GLOBAL_GET(GDScriptWarning::get_settings_path_from_code(GDScriptWarning::RENAMED_IN_GODOT_4_HINT)).booleanize()) {
@@ -3987,9 +4044,9 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod
rename_hint = " " + vformat(R"(Did you mean to use "%s"?)", renamed_identifier_name);
}
}
- push_error(vformat(R"(Cannot find constant "%s" on base "%s".%s)", name, base.to_string(), rename_hint), p_identifier);
+ push_error(vformat(R"(Cannot find member "%s" in base "%s".%s)", name, base.to_string(), rename_hint), p_identifier);
#else
- push_error(vformat(R"(Cannot find constant "%s" on base "%s".)", name, base.to_string()), p_identifier);
+ push_error(vformat(R"(Cannot find member "%s" in base "%s".)", name, base.to_string()), p_identifier);
#endif // SUGGEST_GODOT4_RENAMES
}
} else {
@@ -4031,9 +4088,9 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod
rename_hint = " " + vformat(R"(Did you mean to use "%s"?)", renamed_identifier_name);
}
}
- push_error(vformat(R"(Cannot find property "%s" on base "%s".%s)", name, base.to_string(), rename_hint), p_identifier);
+ push_error(vformat(R"(Cannot find member "%s" in base "%s".%s)", name, base.to_string(), rename_hint), p_identifier);
#else
- push_error(vformat(R"(Cannot find property "%s" on base "%s".)", name, base.to_string()), p_identifier);
+ push_error(vformat(R"(Cannot find member "%s" in base "%s".)", name, base.to_string()), p_identifier);
#endif // SUGGEST_GODOT4_RENAMES
}
}
@@ -5574,7 +5631,7 @@ GDScriptParser::DataType GDScriptAnalyzer::type_from_property(const PropertyInfo
} else {
Vector<String> names = String(p_property.class_name).split(ENUM_SEPARATOR);
if (names.size() == 2) {
- result = make_native_enum_type(names[1], names[0], false);
+ result = make_enum_type(names[1], names[0], false);
result.is_constant = false;
}
}
diff --git a/modules/gdscript/gdscript_byte_codegen.cpp b/modules/gdscript/gdscript_byte_codegen.cpp
index 5740e6e137..e97f50a42b 100644
--- a/modules/gdscript/gdscript_byte_codegen.cpp
+++ b/modules/gdscript/gdscript_byte_codegen.cpp
@@ -587,8 +587,25 @@ void GDScriptByteCodeGenerator::write_unary_operator(const Address &p_target, Va
}
void GDScriptByteCodeGenerator::write_binary_operator(const Address &p_target, Variant::Operator p_operator, const Address &p_left_operand, const Address &p_right_operand) {
- // Avoid validated evaluator for modulo and division when operands are int, since there's no check for division by zero.
- if (HAS_BUILTIN_TYPE(p_left_operand) && HAS_BUILTIN_TYPE(p_right_operand) && ((p_operator != Variant::OP_DIVIDE && p_operator != Variant::OP_MODULE) || p_left_operand.type.builtin_type != Variant::INT || p_right_operand.type.builtin_type != Variant::INT)) {
+ bool valid = HAS_BUILTIN_TYPE(p_left_operand) && HAS_BUILTIN_TYPE(p_right_operand);
+
+ // Avoid validated evaluator for modulo and division when operands are int or integer vector, since there's no check for division by zero.
+ if (valid && (p_operator == Variant::OP_DIVIDE || p_operator == Variant::OP_MODULE)) {
+ switch (p_left_operand.type.builtin_type) {
+ case Variant::INT:
+ valid = p_right_operand.type.builtin_type != Variant::INT;
+ break;
+ case Variant::VECTOR2I:
+ case Variant::VECTOR3I:
+ case Variant::VECTOR4I:
+ valid = p_right_operand.type.builtin_type != Variant::INT && p_right_operand.type.builtin_type != p_left_operand.type.builtin_type;
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (valid) {
if (p_target.mode == Address::TEMPORARY) {
Variant::Type result_type = Variant::get_operator_return_type(p_operator, p_left_operand.type.builtin_type, p_right_operand.type.builtin_type);
Variant::Type temp_type = temporaries[p_target.address].type;
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index c3f091a2a3..1011fb6a86 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -1141,10 +1141,12 @@ static void _find_identifiers_in_class(const GDScriptParser::ClassNode *p_class,
continue;
}
option = ScriptLanguage::CodeCompletionOption(member.function->identifier->name, ScriptLanguage::CODE_COMPLETION_KIND_FUNCTION, location);
- if (member.function->parameters.size() > 0) {
+ if (member.function->parameters.size() > 0 || (member.function->info.flags & METHOD_FLAG_VARARG)) {
option.insert_text += "(";
+ option.display += U"(\u2026)";
} else {
option.insert_text += "()";
+ option.display += "()";
}
break;
case GDScriptParser::ClassNode::Member::SIGNAL:
@@ -1186,6 +1188,7 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base
if (!p_types_only && base_type.is_meta_type && base_type.kind != GDScriptParser::DataType::BUILTIN && base_type.kind != GDScriptParser::DataType::ENUM) {
ScriptLanguage::CodeCompletionOption option("new", ScriptLanguage::CODE_COMPLETION_KIND_FUNCTION, ScriptLanguage::LOCATION_LOCAL);
option.insert_text += "(";
+ option.display += U"(\u2026)";
r_result.insert(option.display, option);
}
@@ -1243,10 +1246,12 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base
}
int location = p_recursion_depth + _get_method_location(scr->get_class_name(), E.name);
ScriptLanguage::CodeCompletionOption option(E.name, ScriptLanguage::CODE_COMPLETION_KIND_FUNCTION, location);
- if (E.arguments.size()) {
+ if (E.arguments.size() || (E.flags & METHOD_FLAG_VARARG)) {
option.insert_text += "(";
+ option.display += U"(\u2026)";
} else {
option.insert_text += "()";
+ option.display += "()";
}
r_result.insert(option.display, option);
}
@@ -1329,10 +1334,12 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base
}
int location = p_recursion_depth + _get_method_location(type, E.name);
ScriptLanguage::CodeCompletionOption option(E.name, ScriptLanguage::CODE_COMPLETION_KIND_FUNCTION, location);
- if (E.arguments.size()) {
+ if (E.arguments.size() || (E.flags & METHOD_FLAG_VARARG)) {
option.insert_text += "(";
+ option.display += U"(\u2026)";
} else {
option.insert_text += "()";
+ option.display += "()";
}
r_result.insert(option.display, option);
}
@@ -1400,10 +1407,12 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base
continue;
}
ScriptLanguage::CodeCompletionOption option(E.name, ScriptLanguage::CODE_COMPLETION_KIND_FUNCTION, location);
- if (E.arguments.size()) {
+ if (E.arguments.size() || (E.flags & METHOD_FLAG_VARARG)) {
option.insert_text += "(";
+ option.display += U"(\u2026)";
} else {
option.insert_text += "()";
+ option.display += "()";
}
r_result.insert(option.display, option);
}
@@ -1435,8 +1444,10 @@ static void _find_identifiers(const GDScriptParser::CompletionContext &p_context
ScriptLanguage::CodeCompletionOption option(String(E), ScriptLanguage::CODE_COMPLETION_KIND_FUNCTION);
if (function.arguments.size() || (function.flags & METHOD_FLAG_VARARG)) {
option.insert_text += "(";
+ option.display += U"(\u2026)";
} else {
option.insert_text += "()";
+ option.display += "()";
}
r_result.insert(option.display, option);
}
@@ -1483,6 +1494,7 @@ static void _find_identifiers(const GDScriptParser::CompletionContext &p_context
while (*kwa) {
ScriptLanguage::CodeCompletionOption option(*kwa, ScriptLanguage::CODE_COMPLETION_KIND_FUNCTION);
option.insert_text += "(";
+ option.display += U"(\u2026)";
r_result.insert(option.display, option);
kwa++;
}
@@ -1493,6 +1505,7 @@ static void _find_identifiers(const GDScriptParser::CompletionContext &p_context
for (List<StringName>::Element *E = utility_func_names.front(); E; E = E->next()) {
ScriptLanguage::CodeCompletionOption option(E->get(), ScriptLanguage::CODE_COMPLETION_KIND_FUNCTION);
option.insert_text += "(";
+ option.display += U"(\u2026)"; // As all utility functions contain an argument or more, this is hardcoded here.
r_result.insert(option.display, option);
}
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_builtin_access.gd b/modules/gdscript/tests/scripts/analyzer/errors/enum_builtin_access.gd
new file mode 100644
index 0000000000..6367d50980
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_builtin_access.gd
@@ -0,0 +1,2 @@
+func test():
+ print(Vector3.Axis)
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_builtin_access.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_builtin_access.out
new file mode 100644
index 0000000000..9c476031f3
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_builtin_access.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Type "Axis" in base "Vector3" cannot be used on its own.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_global_access.gd b/modules/gdscript/tests/scripts/analyzer/errors/enum_global_access.gd
new file mode 100644
index 0000000000..badcd3a83c
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_global_access.gd
@@ -0,0 +1,2 @@
+func test():
+ print(Variant.Operator)
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_global_access.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_global_access.out
new file mode 100644
index 0000000000..191acade73
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_global_access.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Type "Operator" in base "Variant" cannot be used on its own.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_native_access.gd b/modules/gdscript/tests/scripts/analyzer/errors/enum_native_access.gd
new file mode 100644
index 0000000000..e07998ddf6
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_native_access.gd
@@ -0,0 +1,2 @@
+func test():
+ print(Node.ProcessMode)
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_native_access.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_native_access.out
new file mode 100644
index 0000000000..83671fc493
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_native_access.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Type "ProcessMode" in base "Node" cannot be used on its own.
diff --git a/modules/gdscript/tests/scripts/analyzer/features/global_builtin_and_native_enums.gd b/modules/gdscript/tests/scripts/analyzer/features/global_builtin_and_native_enums.gd
new file mode 100644
index 0000000000..4ccd7de994
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/global_builtin_and_native_enums.gd
@@ -0,0 +1,28 @@
+extends Node
+
+@export var test_type_1 := TYPE_BOOL
+@export var test_type_2 := Variant.Type.TYPE_BOOL
+@export var test_type_3: Variant.Type
+
+@export var test_side_1 := SIDE_RIGHT
+@export var test_side_2 := Side.SIDE_RIGHT
+@export var test_side_3: Side
+
+@export var test_axis_1 := Vector3.AXIS_Y
+@export var test_axis_2 := Vector3.Axis.AXIS_Y
+@export var test_axis_3: Vector3.Axis
+
+@export var test_mode_1 := Node.PROCESS_MODE_ALWAYS
+@export var test_mode_2 := Node.ProcessMode.PROCESS_MODE_ALWAYS
+@export var test_mode_3: Node.ProcessMode
+
+func test():
+ for property in get_property_list():
+ if str(property.name).begins_with("test_"):
+ Utils.print_property_extended_info(property, self)
+
+func test_no_exec():
+ # GH-99309
+ var sprite: Sprite3D = $Sprite3D
+ sprite.axis = Vector3.AXIS_Y # No warning.
+ sprite.set_axis(Vector3.AXIS_Y) # No warning.
diff --git a/modules/gdscript/tests/scripts/analyzer/features/global_builtin_and_native_enums.out b/modules/gdscript/tests/scripts/analyzer/features/global_builtin_and_native_enums.out
new file mode 100644
index 0000000000..6c45dee323
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/global_builtin_and_native_enums.out
@@ -0,0 +1,25 @@
+GDTEST_OK
+var test_type_1: Variant.Type = 1
+ hint=ENUM hint_string="Type Nil:0,Type Bool:1,Type Int:2,Type Float:3,Type String:4,Type Vector 2:5,Type Vector 2i:6,Type Rect 2:7,Type Rect 2i:8,Type Vector 3:9,Type Vector 3i:10,Type Transform 2d:11,Type Vector 4:12,Type Vector 4i:13,Type Plane:14,Type Quaternion:15,Type Aabb:16,Type Basis:17,Type Transform 3d:18,Type Projection:19,Type Color:20,Type String Name:21,Type Node Path:22,Type Rid:23,Type Object:24,Type Callable:25,Type Signal:26,Type Dictionary:27,Type Array:28,Type Packed Byte Array:29,Type Packed Int 32 Array:30,Type Packed Int 64 Array:31,Type Packed Float 32 Array:32,Type Packed Float 64 Array:33,Type Packed String Array:34,Type Packed Vector 2 Array:35,Type Packed Vector 3 Array:36,Type Packed Color Array:37,Type Packed Vector 4 Array:38,Type Max:39" usage=DEFAULT|SCRIPT_VARIABLE|CLASS_IS_ENUM class_name=&"Variant.Type"
+var test_type_2: Variant.Type = 1
+ hint=ENUM hint_string="Type Nil:0,Type Bool:1,Type Int:2,Type Float:3,Type String:4,Type Vector 2:5,Type Vector 2i:6,Type Rect 2:7,Type Rect 2i:8,Type Vector 3:9,Type Vector 3i:10,Type Transform 2d:11,Type Vector 4:12,Type Vector 4i:13,Type Plane:14,Type Quaternion:15,Type Aabb:16,Type Basis:17,Type Transform 3d:18,Type Projection:19,Type Color:20,Type String Name:21,Type Node Path:22,Type Rid:23,Type Object:24,Type Callable:25,Type Signal:26,Type Dictionary:27,Type Array:28,Type Packed Byte Array:29,Type Packed Int 32 Array:30,Type Packed Int 64 Array:31,Type Packed Float 32 Array:32,Type Packed Float 64 Array:33,Type Packed String Array:34,Type Packed Vector 2 Array:35,Type Packed Vector 3 Array:36,Type Packed Color Array:37,Type Packed Vector 4 Array:38,Type Max:39" usage=DEFAULT|SCRIPT_VARIABLE|CLASS_IS_ENUM class_name=&"Variant.Type"
+var test_type_3: Variant.Type = 0
+ hint=ENUM hint_string="Type Nil:0,Type Bool:1,Type Int:2,Type Float:3,Type String:4,Type Vector 2:5,Type Vector 2i:6,Type Rect 2:7,Type Rect 2i:8,Type Vector 3:9,Type Vector 3i:10,Type Transform 2d:11,Type Vector 4:12,Type Vector 4i:13,Type Plane:14,Type Quaternion:15,Type Aabb:16,Type Basis:17,Type Transform 3d:18,Type Projection:19,Type Color:20,Type String Name:21,Type Node Path:22,Type Rid:23,Type Object:24,Type Callable:25,Type Signal:26,Type Dictionary:27,Type Array:28,Type Packed Byte Array:29,Type Packed Int 32 Array:30,Type Packed Int 64 Array:31,Type Packed Float 32 Array:32,Type Packed Float 64 Array:33,Type Packed String Array:34,Type Packed Vector 2 Array:35,Type Packed Vector 3 Array:36,Type Packed Color Array:37,Type Packed Vector 4 Array:38,Type Max:39" usage=DEFAULT|SCRIPT_VARIABLE|CLASS_IS_ENUM class_name=&"Variant.Type"
+var test_side_1: Side = 2
+ hint=ENUM hint_string="Side Left:0,Side Top:1,Side Right:2,Side Bottom:3" usage=DEFAULT|SCRIPT_VARIABLE|CLASS_IS_ENUM class_name=&"Side"
+var test_side_2: Side = 2
+ hint=ENUM hint_string="Side Left:0,Side Top:1,Side Right:2,Side Bottom:3" usage=DEFAULT|SCRIPT_VARIABLE|CLASS_IS_ENUM class_name=&"Side"
+var test_side_3: Side = 0
+ hint=ENUM hint_string="Side Left:0,Side Top:1,Side Right:2,Side Bottom:3" usage=DEFAULT|SCRIPT_VARIABLE|CLASS_IS_ENUM class_name=&"Side"
+var test_axis_1: Vector3.Axis = 1
+ hint=ENUM hint_string="Axis X:0,Axis Y:1,Axis Z:2" usage=DEFAULT|SCRIPT_VARIABLE|CLASS_IS_ENUM class_name=&"Vector3.Axis"
+var test_axis_2: Vector3.Axis = 1
+ hint=ENUM hint_string="Axis X:0,Axis Y:1,Axis Z:2" usage=DEFAULT|SCRIPT_VARIABLE|CLASS_IS_ENUM class_name=&"Vector3.Axis"
+var test_axis_3: Vector3.Axis = 0
+ hint=ENUM hint_string="Axis X:0,Axis Y:1,Axis Z:2" usage=DEFAULT|SCRIPT_VARIABLE|CLASS_IS_ENUM class_name=&"Vector3.Axis"
+var test_mode_1: Node.ProcessMode = 3
+ hint=ENUM hint_string="Process Mode Inherit:0,Process Mode Pausable:1,Process Mode When Paused:2,Process Mode Always:3,Process Mode Disabled:4" usage=DEFAULT|SCRIPT_VARIABLE|CLASS_IS_ENUM class_name=&"Node.ProcessMode"
+var test_mode_2: Node.ProcessMode = 3
+ hint=ENUM hint_string="Process Mode Inherit:0,Process Mode Pausable:1,Process Mode When Paused:2,Process Mode Always:3,Process Mode Disabled:4" usage=DEFAULT|SCRIPT_VARIABLE|CLASS_IS_ENUM class_name=&"Node.ProcessMode"
+var test_mode_3: Node.ProcessMode = 0
+ hint=ENUM hint_string="Process Mode Inherit:0,Process Mode Pausable:1,Process Mode When Paused:2,Process Mode Always:3,Process Mode Disabled:4" usage=DEFAULT|SCRIPT_VARIABLE|CLASS_IS_ENUM class_name=&"Node.ProcessMode"
diff --git a/modules/gdscript/tests/scripts/completion/assignment_options/enum_attribute.cfg b/modules/gdscript/tests/scripts/completion/assignment_options/enum_attribute.cfg
index e4759ac76b..a2c332adad 100644
--- a/modules/gdscript/tests/scripts/completion/assignment_options/enum_attribute.cfg
+++ b/modules/gdscript/tests/scripts/completion/assignment_options/enum_attribute.cfg
@@ -1,6 +1,6 @@
[output]
include=[
- {"display": "new"},
+ {"display": "new(…)"},
{"display": "SIZE_EXPAND"},
{"display": "SIZE_EXPAND_FILL"},
{"display": "SIZE_FILL"},
diff --git a/modules/gdscript/tests/scripts/completion/assignment_options/enum_attribute_identifier.cfg b/modules/gdscript/tests/scripts/completion/assignment_options/enum_attribute_identifier.cfg
index e4759ac76b..a2c332adad 100644
--- a/modules/gdscript/tests/scripts/completion/assignment_options/enum_attribute_identifier.cfg
+++ b/modules/gdscript/tests/scripts/completion/assignment_options/enum_attribute_identifier.cfg
@@ -1,6 +1,6 @@
[output]
include=[
- {"display": "new"},
+ {"display": "new(…)"},
{"display": "SIZE_EXPAND"},
{"display": "SIZE_EXPAND_FILL"},
{"display": "SIZE_FILL"},
diff --git a/modules/gdscript/tests/scripts/completion/common/identifiers_in_call.cfg b/modules/gdscript/tests/scripts/completion/common/identifiers_in_call.cfg
index 5f08f9c265..f2dff734b6 100644
--- a/modules/gdscript/tests/scripts/completion/common/identifiers_in_call.cfg
+++ b/modules/gdscript/tests/scripts/completion/common/identifiers_in_call.cfg
@@ -2,13 +2,13 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
; GDScript: identifiers.gd
@@ -16,8 +16,8 @@ include=[
{"display": "test_signal_2"},
{"display": "test_var_1"},
{"display": "test_var_2"},
- {"display": "test_func_1"},
- {"display": "test_func_2"},
+ {"display": "test_func_1(…)"},
+ {"display": "test_func_2(…)"},
{"display": "test_parameter_1"},
{"display": "test_parameter_2"},
{"display": "local_test_var_1"},
diff --git a/modules/gdscript/tests/scripts/completion/common/identifiers_in_function_body.cfg b/modules/gdscript/tests/scripts/completion/common/identifiers_in_function_body.cfg
index 5f08f9c265..f2dff734b6 100644
--- a/modules/gdscript/tests/scripts/completion/common/identifiers_in_function_body.cfg
+++ b/modules/gdscript/tests/scripts/completion/common/identifiers_in_function_body.cfg
@@ -2,13 +2,13 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
; GDScript: identifiers.gd
@@ -16,8 +16,8 @@ include=[
{"display": "test_signal_2"},
{"display": "test_var_1"},
{"display": "test_var_2"},
- {"display": "test_func_1"},
- {"display": "test_func_2"},
+ {"display": "test_func_1(…)"},
+ {"display": "test_func_2(…)"},
{"display": "test_parameter_1"},
{"display": "test_parameter_2"},
{"display": "local_test_var_1"},
diff --git a/modules/gdscript/tests/scripts/completion/common/identifiers_in_unclosed_call.cfg b/modules/gdscript/tests/scripts/completion/common/identifiers_in_unclosed_call.cfg
index 5f08f9c265..f2dff734b6 100644
--- a/modules/gdscript/tests/scripts/completion/common/identifiers_in_unclosed_call.cfg
+++ b/modules/gdscript/tests/scripts/completion/common/identifiers_in_unclosed_call.cfg
@@ -2,13 +2,13 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
; GDScript: identifiers.gd
@@ -16,8 +16,8 @@ include=[
{"display": "test_signal_2"},
{"display": "test_var_1"},
{"display": "test_var_2"},
- {"display": "test_func_1"},
- {"display": "test_func_2"},
+ {"display": "test_func_1(…)"},
+ {"display": "test_func_2(…)"},
{"display": "test_parameter_1"},
{"display": "test_parameter_2"},
{"display": "local_test_var_1"},
diff --git a/modules/gdscript/tests/scripts/completion/common/no_completion_in_string.cfg b/modules/gdscript/tests/scripts/completion/common/no_completion_in_string.cfg
index 462846c9b2..e012919051 100644
--- a/modules/gdscript/tests/scripts/completion/common/no_completion_in_string.cfg
+++ b/modules/gdscript/tests/scripts/completion/common/no_completion_in_string.cfg
@@ -2,14 +2,14 @@ scene="res://completion/get_node/get_node.tscn"
[output]
exclude=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
- {"display": "add_child"},
+ {"display": "add_child(…)"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
; GDScript: no_completion_in_string.gd
@@ -17,8 +17,8 @@ exclude=[
{"display": "test_signal_2"},
{"display": "test_var_1"},
{"display": "test_var_2"},
- {"display": "test_func_1"},
- {"display": "test_func_2"},
+ {"display": "test_func_1(…)"},
+ {"display": "test_func_2(…)"},
{"display": "test_parameter_1"},
{"display": "test_parameter_2"},
{"display": "local_test_var_1"},
diff --git a/modules/gdscript/tests/scripts/completion/common/self.cfg b/modules/gdscript/tests/scripts/completion/common/self.cfg
index 871a404e3a..dcce1df0d0 100644
--- a/modules/gdscript/tests/scripts/completion/common/self.cfg
+++ b/modules/gdscript/tests/scripts/completion/common/self.cfg
@@ -2,13 +2,13 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
; GDScript: self.gd
@@ -16,6 +16,6 @@ include=[
{"display": "test_signal_2"},
{"display": "test_var_1"},
{"display": "test_var_2"},
- {"display": "test_func_1"},
- {"display": "test_func_2"},
+ {"display": "test_func_1(…)"},
+ {"display": "test_func_2(…)"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/literal/dollar.cfg b/modules/gdscript/tests/scripts/completion/get_node/literal/dollar.cfg
index ae7d34d87d..319c5121b5 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/literal/dollar.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/literal/dollar.cfg
@@ -1,7 +1,7 @@
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/literal/percent.cfg b/modules/gdscript/tests/scripts/completion/get_node/literal/percent.cfg
index ae7d34d87d..319c5121b5 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/literal/percent.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/literal/percent.cfg
@@ -1,7 +1,7 @@
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/literal_scene/dollar_class_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/literal_scene/dollar_class_scene.cfg
index 9c580b711d..7518bf5ae5 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/literal_scene/dollar_class_scene.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/literal_scene/dollar_class_scene.cfg
@@ -3,12 +3,12 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/literal_scene/dollar_native_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/literal_scene/dollar_native_scene.cfg
index 446198dd35..174fdcb184 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/literal_scene/dollar_native_scene.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/literal_scene/dollar_native_scene.cfg
@@ -3,12 +3,12 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; AnimationPlayer
{"display": "autoplay"},
- {"display": "play"},
+ {"display": "play(…)"},
{"display": "animation_changed"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/literal_scene/percent_class_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/literal_scene/percent_class_scene.cfg
index 9c580b711d..7518bf5ae5 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/literal_scene/percent_class_scene.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/literal_scene/percent_class_scene.cfg
@@ -3,12 +3,12 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/literal_scene/percent_native_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/literal_scene/percent_native_scene.cfg
index 446198dd35..174fdcb184 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/literal_scene/percent_native_scene.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/literal_scene/percent_native_scene.cfg
@@ -3,12 +3,12 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; AnimationPlayer
{"display": "autoplay"},
- {"display": "play"},
+ {"display": "play(…)"},
{"display": "animation_changed"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/local/local.cfg b/modules/gdscript/tests/scripts/completion/get_node/local/local.cfg
index ae7d34d87d..319c5121b5 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/local/local.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/local/local.cfg
@@ -1,7 +1,7 @@
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/local_infered/local_infered.cfg b/modules/gdscript/tests/scripts/completion/get_node/local_infered/local_infered.cfg
index ae7d34d87d..319c5121b5 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/local_infered/local_infered.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/local_infered/local_infered.cfg
@@ -1,7 +1,7 @@
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/local_infered_scene/class_local_infered_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/local_infered_scene/class_local_infered_scene.cfg
index 9c580b711d..7518bf5ae5 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/local_infered_scene/class_local_infered_scene.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/local_infered_scene/class_local_infered_scene.cfg
@@ -3,12 +3,12 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/local_infered_scene/native_local_infered_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/local_infered_scene/native_local_infered_scene.cfg
index 446198dd35..174fdcb184 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/local_infered_scene/native_local_infered_scene.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/local_infered_scene/native_local_infered_scene.cfg
@@ -3,12 +3,12 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; AnimationPlayer
{"display": "autoplay"},
- {"display": "play"},
+ {"display": "play(…)"},
{"display": "animation_changed"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/local_scene/class_local_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/local_scene/class_local_scene.cfg
index 9c580b711d..7518bf5ae5 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/local_scene/class_local_scene.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/local_scene/class_local_scene.cfg
@@ -3,12 +3,12 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/local_scene/native_local_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/local_scene/native_local_scene.cfg
index 446198dd35..174fdcb184 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/local_scene/native_local_scene.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/local_scene/native_local_scene.cfg
@@ -3,12 +3,12 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; AnimationPlayer
{"display": "autoplay"},
- {"display": "play"},
+ {"display": "play(…)"},
{"display": "animation_changed"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/local_typehint/class_local_typehint.cfg b/modules/gdscript/tests/scripts/completion/get_node/local_typehint/class_local_typehint.cfg
index 8b68d51a89..050b0d61a3 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/local_typehint/class_local_typehint.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/local_typehint/class_local_typehint.cfg
@@ -1,12 +1,12 @@
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/local_typehint/native_local_typehint.cfg b/modules/gdscript/tests/scripts/completion/get_node/local_typehint/native_local_typehint.cfg
index 72c0549d3b..d647135bc6 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/local_typehint/native_local_typehint.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/local_typehint/native_local_typehint.cfg
@@ -1,12 +1,12 @@
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; AnimationPlayer
{"display": "autoplay"},
- {"display": "play"},
+ {"display": "play(…)"},
{"display": "animation_changed"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene/class_local_typehint_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene/class_local_typehint_scene.cfg
index 9c580b711d..7518bf5ae5 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene/class_local_typehint_scene.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene/class_local_typehint_scene.cfg
@@ -3,12 +3,12 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene/native_local_typehint_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene/native_local_typehint_scene.cfg
index 446198dd35..174fdcb184 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene/native_local_typehint_scene.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene/native_local_typehint_scene.cfg
@@ -3,12 +3,12 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; AnimationPlayer
{"display": "autoplay"},
- {"display": "play"},
+ {"display": "play(…)"},
{"display": "animation_changed"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene_broad/class_local_typehint_scene_broad.cfg b/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene_broad/class_local_typehint_scene_broad.cfg
index 9c580b711d..7518bf5ae5 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene_broad/class_local_typehint_scene_broad.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene_broad/class_local_typehint_scene_broad.cfg
@@ -3,12 +3,12 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene_broad/native_local_typehint_scene_broad.cfg b/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene_broad/native_local_typehint_scene_broad.cfg
index 446198dd35..174fdcb184 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene_broad/native_local_typehint_scene_broad.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene_broad/native_local_typehint_scene_broad.cfg
@@ -3,12 +3,12 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; AnimationPlayer
{"display": "autoplay"},
- {"display": "play"},
+ {"display": "play(…)"},
{"display": "animation_changed"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene_incompatible/class_local_typehint_scene_incompatible.cfg b/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene_incompatible/class_local_typehint_scene_incompatible.cfg
index 1894e72c65..a6118908de 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene_incompatible/class_local_typehint_scene_incompatible.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene_incompatible/class_local_typehint_scene_incompatible.cfg
@@ -3,18 +3,18 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; Area2D
- {"display": "get_overlapping_areas"},
+ {"display": "get_overlapping_areas()"},
{"display": "linear_damp"},
{"display": "area_entered"},
]
exclude=[
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene_incompatible/native_local_typehint_scene_incompatible.cfg b/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene_incompatible/native_local_typehint_scene_incompatible.cfg
index c8ab63f6d6..d8390ca33c 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene_incompatible/native_local_typehint_scene_incompatible.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/local_typehint_scene_incompatible/native_local_typehint_scene_incompatible.cfg
@@ -3,18 +3,18 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; Area2D
- {"display": "get_overlapping_areas"},
+ {"display": "get_overlapping_areas()"},
{"display": "linear_damp"},
{"display": "area_entered"},
]
exclude=[
; AnimationPlayer
{"display": "autoplay"},
- {"display": "play"},
+ {"display": "play(…)"},
{"display": "animation_changed"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/member/member.cfg b/modules/gdscript/tests/scripts/completion/get_node/member/member.cfg
index ae7d34d87d..319c5121b5 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/member/member.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/member/member.cfg
@@ -1,7 +1,7 @@
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/member_infered/member_infered.cfg b/modules/gdscript/tests/scripts/completion/get_node/member_infered/member_infered.cfg
index ae7d34d87d..319c5121b5 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/member_infered/member_infered.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/member_infered/member_infered.cfg
@@ -1,7 +1,7 @@
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/member_infered_scene/class_member_infered_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/member_infered_scene/class_member_infered_scene.cfg
index 9c580b711d..7518bf5ae5 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/member_infered_scene/class_member_infered_scene.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/member_infered_scene/class_member_infered_scene.cfg
@@ -3,12 +3,12 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/member_infered_scene/native_member_infered_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/member_infered_scene/native_member_infered_scene.cfg
index 446198dd35..174fdcb184 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/member_infered_scene/native_member_infered_scene.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/member_infered_scene/native_member_infered_scene.cfg
@@ -3,12 +3,12 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; AnimationPlayer
{"display": "autoplay"},
- {"display": "play"},
+ {"display": "play(…)"},
{"display": "animation_changed"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/member_scene/class_member_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/member_scene/class_member_scene.cfg
index 9c580b711d..7518bf5ae5 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/member_scene/class_member_scene.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/member_scene/class_member_scene.cfg
@@ -3,12 +3,12 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/member_scene/native_member_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/member_scene/native_member_scene.cfg
index 446198dd35..174fdcb184 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/member_scene/native_member_scene.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/member_scene/native_member_scene.cfg
@@ -3,12 +3,12 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; AnimationPlayer
{"display": "autoplay"},
- {"display": "play"},
+ {"display": "play(…)"},
{"display": "animation_changed"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/member_typehint/class_member_typehint.cfg b/modules/gdscript/tests/scripts/completion/get_node/member_typehint/class_member_typehint.cfg
index 8b68d51a89..050b0d61a3 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/member_typehint/class_member_typehint.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/member_typehint/class_member_typehint.cfg
@@ -1,12 +1,12 @@
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/member_typehint/native_member_typehint.cfg b/modules/gdscript/tests/scripts/completion/get_node/member_typehint/native_member_typehint.cfg
index 72c0549d3b..d647135bc6 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/member_typehint/native_member_typehint.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/member_typehint/native_member_typehint.cfg
@@ -1,12 +1,12 @@
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; AnimationPlayer
{"display": "autoplay"},
- {"display": "play"},
+ {"display": "play(…)"},
{"display": "animation_changed"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene/class_member_typehint_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene/class_member_typehint_scene.cfg
index 9c580b711d..7518bf5ae5 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene/class_member_typehint_scene.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene/class_member_typehint_scene.cfg
@@ -3,12 +3,12 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene/native_member_typehint_scene.cfg b/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene/native_member_typehint_scene.cfg
index 446198dd35..174fdcb184 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene/native_member_typehint_scene.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene/native_member_typehint_scene.cfg
@@ -3,12 +3,12 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; AnimationPlayer
{"display": "autoplay"},
- {"display": "play"},
+ {"display": "play(…)"},
{"display": "animation_changed"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene_broad/class_member_typehint_scene_broad.cfg b/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene_broad/class_member_typehint_scene_broad.cfg
index 502038bef7..2f747e0bac 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene_broad/class_member_typehint_scene_broad.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene_broad/class_member_typehint_scene_broad.cfg
@@ -3,7 +3,7 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
@@ -11,6 +11,6 @@ include=[
exclude=[
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene_broad/native_member_typehint_scene_broad.cfg b/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene_broad/native_member_typehint_scene_broad.cfg
index 1810e9fe5f..f060413898 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene_broad/native_member_typehint_scene_broad.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene_broad/native_member_typehint_scene_broad.cfg
@@ -3,7 +3,7 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
@@ -11,6 +11,6 @@ include=[
exclude=[
; AnimationPlayer
{"display": "autoplay"},
- {"display": "play"},
+ {"display": "play(…)"},
{"display": "animation_changed"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene_incompatible/class_member_typehint_scene_incompatible.cfg b/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene_incompatible/class_member_typehint_scene_incompatible.cfg
index 1894e72c65..a6118908de 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene_incompatible/class_member_typehint_scene_incompatible.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene_incompatible/class_member_typehint_scene_incompatible.cfg
@@ -3,18 +3,18 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; Area2D
- {"display": "get_overlapping_areas"},
+ {"display": "get_overlapping_areas()"},
{"display": "linear_damp"},
{"display": "area_entered"},
]
exclude=[
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene_incompatible/native_member_typehint_scene_incompatible.cfg b/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene_incompatible/native_member_typehint_scene_incompatible.cfg
index c8ab63f6d6..d8390ca33c 100644
--- a/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene_incompatible/native_member_typehint_scene_incompatible.cfg
+++ b/modules/gdscript/tests/scripts/completion/get_node/member_typehint_scene_incompatible/native_member_typehint_scene_incompatible.cfg
@@ -3,18 +3,18 @@ scene="res://completion/get_node/get_node.tscn"
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; Area2D
- {"display": "get_overlapping_areas"},
+ {"display": "get_overlapping_areas()"},
{"display": "linear_damp"},
{"display": "area_entered"},
]
exclude=[
; AnimationPlayer
{"display": "autoplay"},
- {"display": "play"},
+ {"display": "play(…)"},
{"display": "animation_changed"},
]
diff --git a/modules/gdscript/tests/scripts/completion/types/local/infered.cfg b/modules/gdscript/tests/scripts/completion/types/local/infered.cfg
index 8b68d51a89..050b0d61a3 100644
--- a/modules/gdscript/tests/scripts/completion/types/local/infered.cfg
+++ b/modules/gdscript/tests/scripts/completion/types/local/infered.cfg
@@ -1,12 +1,12 @@
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/types/local/no_type.cfg b/modules/gdscript/tests/scripts/completion/types/local/no_type.cfg
index 8b68d51a89..050b0d61a3 100644
--- a/modules/gdscript/tests/scripts/completion/types/local/no_type.cfg
+++ b/modules/gdscript/tests/scripts/completion/types/local/no_type.cfg
@@ -1,12 +1,12 @@
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/types/local/typehint.cfg b/modules/gdscript/tests/scripts/completion/types/local/typehint.cfg
index 8b68d51a89..050b0d61a3 100644
--- a/modules/gdscript/tests/scripts/completion/types/local/typehint.cfg
+++ b/modules/gdscript/tests/scripts/completion/types/local/typehint.cfg
@@ -1,12 +1,12 @@
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/types/local/typehint_broad.cfg b/modules/gdscript/tests/scripts/completion/types/local/typehint_broad.cfg
index 8b68d51a89..050b0d61a3 100644
--- a/modules/gdscript/tests/scripts/completion/types/local/typehint_broad.cfg
+++ b/modules/gdscript/tests/scripts/completion/types/local/typehint_broad.cfg
@@ -1,12 +1,12 @@
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/types/local/typehint_incompatible.cfg b/modules/gdscript/tests/scripts/completion/types/local/typehint_incompatible.cfg
index 8b68d51a89..050b0d61a3 100644
--- a/modules/gdscript/tests/scripts/completion/types/local/typehint_incompatible.cfg
+++ b/modules/gdscript/tests/scripts/completion/types/local/typehint_incompatible.cfg
@@ -1,12 +1,12 @@
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/types/member/infered.cfg b/modules/gdscript/tests/scripts/completion/types/member/infered.cfg
index 8b68d51a89..050b0d61a3 100644
--- a/modules/gdscript/tests/scripts/completion/types/member/infered.cfg
+++ b/modules/gdscript/tests/scripts/completion/types/member/infered.cfg
@@ -1,12 +1,12 @@
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/types/member/no_type.cfg b/modules/gdscript/tests/scripts/completion/types/member/no_type.cfg
index 8b68d51a89..050b0d61a3 100644
--- a/modules/gdscript/tests/scripts/completion/types/member/no_type.cfg
+++ b/modules/gdscript/tests/scripts/completion/types/member/no_type.cfg
@@ -1,12 +1,12 @@
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/types/member/typehint.cfg b/modules/gdscript/tests/scripts/completion/types/member/typehint.cfg
index 8b68d51a89..050b0d61a3 100644
--- a/modules/gdscript/tests/scripts/completion/types/member/typehint.cfg
+++ b/modules/gdscript/tests/scripts/completion/types/member/typehint.cfg
@@ -1,12 +1,12 @@
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/types/member/typehint_broad.cfg b/modules/gdscript/tests/scripts/completion/types/member/typehint_broad.cfg
index 81401316ec..d32bbac65e 100644
--- a/modules/gdscript/tests/scripts/completion/types/member/typehint_broad.cfg
+++ b/modules/gdscript/tests/scripts/completion/types/member/typehint_broad.cfg
@@ -1,13 +1,13 @@
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
]
exclude=[
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/completion/types/member/typehint_incompatible.cfg b/modules/gdscript/tests/scripts/completion/types/member/typehint_incompatible.cfg
index 8b68d51a89..050b0d61a3 100644
--- a/modules/gdscript/tests/scripts/completion/types/member/typehint_incompatible.cfg
+++ b/modules/gdscript/tests/scripts/completion/types/member/typehint_incompatible.cfg
@@ -1,12 +1,12 @@
[output]
include=[
; Node
- {"display": "add_child"},
+ {"display": "add_child(…)"},
{"display": "owner"},
{"display": "child_entered_tree"},
; GDScript: class_a.notest.gd
{"display": "property_of_a"},
- {"display": "func_of_a"},
+ {"display": "func_of_a()"},
{"display": "signal_of_a"},
]
diff --git a/modules/gdscript/tests/scripts/runtime/errors/division_by_zero.gd b/modules/gdscript/tests/scripts/runtime/errors/division_by_zero.gd
new file mode 100644
index 0000000000..ace5397f40
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/errors/division_by_zero.gd
@@ -0,0 +1,3 @@
+func test():
+ var integer: int = 1
+ integer /= 0
diff --git a/modules/gdscript/tests/scripts/runtime/errors/division_by_zero.out b/modules/gdscript/tests/scripts/runtime/errors/division_by_zero.out
new file mode 100644
index 0000000000..6a9d11cd77
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/errors/division_by_zero.out
@@ -0,0 +1,6 @@
+GDTEST_RUNTIME_ERROR
+>> SCRIPT ERROR
+>> on function: test()
+>> runtime/errors/division_by_zero.gd
+>> 3
+>> Division by zero error in operator '/'.
diff --git a/modules/gdscript/tests/scripts/runtime/errors/modulo_by_zero.gd b/modules/gdscript/tests/scripts/runtime/errors/modulo_by_zero.gd
new file mode 100644
index 0000000000..99792e4e32
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/errors/modulo_by_zero.gd
@@ -0,0 +1,3 @@
+func test():
+ var integer: int = 1
+ integer %= 0
diff --git a/modules/gdscript/tests/scripts/runtime/errors/modulo_by_zero.out b/modules/gdscript/tests/scripts/runtime/errors/modulo_by_zero.out
new file mode 100644
index 0000000000..79c512888f
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/errors/modulo_by_zero.out
@@ -0,0 +1,6 @@
+GDTEST_RUNTIME_ERROR
+>> SCRIPT ERROR
+>> on function: test()
+>> runtime/errors/modulo_by_zero.gd
+>> 3
+>> Modulo by zero error in operator '%'.
diff --git a/modules/gdscript/tests/scripts/runtime/features/stringify.gd b/modules/gdscript/tests/scripts/runtime/features/stringify.gd
index 8579baf876..463d207e59 100644
--- a/modules/gdscript/tests/scripts/runtime/features/stringify.gd
+++ b/modules/gdscript/tests/scripts/runtime/features/stringify.gd
@@ -4,15 +4,18 @@ func test():
print(-1.25, 0.25, 1.25)
print("hello world")
- print(Vector2(0.25, 0.25))
+ print(Vector2(0.25, 1))
print(Vector2i(0, 0))
- print(Rect2(0.25, 0.25, 0.5, 0.5))
+ print(Rect2(0.25, 0.25, 0.5, 1))
print(Rect2i(0, 0, 0, 0))
- print(Vector3(0.25, 0.25, 0.25))
+ print(Vector3(0.25, 0.25, 1))
print(Vector3i(0, 0, 0))
+ print(Vector4(0.25, 0.25, 0.25, 1))
+ print(Vector4i(0, 0, 0, 0))
+
print(Transform2D.IDENTITY)
print(Plane(1, 2, 3, 4))
print(Quaternion(1, 2, 3, 4))
diff --git a/modules/gdscript/tests/scripts/runtime/features/stringify.out b/modules/gdscript/tests/scripts/runtime/features/stringify.out
index 2463d70ef4..9983366db0 100644
--- a/modules/gdscript/tests/scripts/runtime/features/stringify.out
+++ b/modules/gdscript/tests/scripts/runtime/features/stringify.out
@@ -3,12 +3,14 @@ truefalse
-101
-1.250.251.25
hello world
-(0.25, 0.25)
+(0.25, 1.0)
(0, 0)
-[P: (0.25, 0.25), S: (0.5, 0.5)]
+[P: (0.25, 0.25), S: (0.5, 1.0)]
[P: (0, 0), S: (0, 0)]
-(0.25, 0.25, 0.25)
+(0.25, 0.25, 1.0)
(0, 0, 0)
+(0.25, 0.25, 0.25, 1.0)
+(0, 0, 0, 0)
[X: (1.0, 0.0), Y: (0.0, 1.0), O: (0.0, 0.0)]
[N: (1.0, 2.0, 3.0), D: 4]
(1, 2, 3, 4)
@@ -32,4 +34,4 @@ Node::[signal]property_list_changed
[(1.0, 1.0), (0.0, 0.0)]
[(1.0, 1.0, 1.0), (0.0, 0.0, 0.0)]
[(1.0, 0.0, 0.0, 1.0), (0.0, 0.0, 1.0, 1.0), (0.0, 1.0, 0.0, 1.0)]
-[(1, 1, 1, 1), (0, 0, 0, 0)]
+[(1.0, 1.0, 1.0, 1.0), (0.0, 0.0, 0.0, 0.0)]