From eba984a44f37ef263ee2389aa8eae631298ce0ff Mon Sep 17 00:00:00 2001 From: George Marques Date: Sat, 25 Feb 2023 13:40:31 -0300 Subject: Revert "GDScript: Fix groups and categories been seen as members" This reverts commit 6f2a8434c675b3df2aceca4e5200aaf799eeb2bd. The commit introduces a bug where it creates spurious entries for member information. --- modules/gdscript/gdscript_compiler.cpp | 6 +----- .../scripts/runtime/features/groups_are_not_properties.gd | 11 ----------- .../scripts/runtime/features/groups_are_not_properties.out | 3 --- 3 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 modules/gdscript/tests/scripts/runtime/features/groups_are_not_properties.gd delete mode 100644 modules/gdscript/tests/scripts/runtime/features/groups_are_not_properties.out (limited to 'modules') diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index fad2bf334b..35c9946bc1 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -211,10 +211,6 @@ static bool _can_use_ptrcall(const MethodBind *p_method, const Vectoris_constant && !(p_expression->get_datatype().is_meta_type && p_expression->get_datatype().kind == GDScriptParser::DataType::CLASS)) { return codegen.add_constant(p_expression->reduced_value); @@ -250,7 +246,7 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code // Try members. if (!codegen.function_node || !codegen.function_node->is_static) { // Try member variables. - if (codegen.script->member_indices.has(identifier) && !is_category_or_group(codegen.script->member_info[identifier])) { + if (codegen.script->member_indices.has(identifier)) { if (codegen.script->member_indices[identifier].getter != StringName() && codegen.script->member_indices[identifier].getter != codegen.function_name) { // Perform getter. GDScriptCodeGenerator::Address temp = codegen.add_temporary(codegen.script->member_indices[identifier].data_type); diff --git a/modules/gdscript/tests/scripts/runtime/features/groups_are_not_properties.gd b/modules/gdscript/tests/scripts/runtime/features/groups_are_not_properties.gd deleted file mode 100644 index a5ad7c0b85..0000000000 --- a/modules/gdscript/tests/scripts/runtime/features/groups_are_not_properties.gd +++ /dev/null @@ -1,11 +0,0 @@ -# https://github.com/godotengine/godot/issues/73843 -extends RefCounted - -@export_group("Resource") -@export_category("RefCounted") - -func test(): - var res = Resource.new() - var ref = RefCounted.new() - prints("Resource class not shadowed:", res is Resource) - prints("RefCounted class not shadowed:", ref is RefCounted) diff --git a/modules/gdscript/tests/scripts/runtime/features/groups_are_not_properties.out b/modules/gdscript/tests/scripts/runtime/features/groups_are_not_properties.out deleted file mode 100644 index 182c6dcd3a..0000000000 --- a/modules/gdscript/tests/scripts/runtime/features/groups_are_not_properties.out +++ /dev/null @@ -1,3 +0,0 @@ -GDTEST_OK -Resource class not shadowed: true -RefCounted class not shadowed: true -- cgit v1.2.3