From f2a2293709472f5b4e418b8f38d48eef987cc0de Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Fri, 13 Dec 2019 19:55:32 +0100 Subject: Mono/C#: Fix class parser incorrectly handling nested namespaces It would incorrectly error thinking the nested namespace is being declared inside a struct/class. This was because of an incorrect nesting level being used for classes and structs. --- modules/mono/editor/script_class_parser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/mono/editor/script_class_parser.cpp b/modules/mono/editor/script_class_parser.cpp index 987a2a4aa6..1c3a583601 100644 --- a/modules/mono/editor/script_class_parser.cpp +++ b/modules/mono/editor/script_class_parser.cpp @@ -509,7 +509,7 @@ Error ScriptClassParser::parse(const String &p_code) { if (tk == TK_IDENTIFIER) { String name = value; - int at_level = type_curly_stack; + int at_level = curly_stack; ClassDecl class_decl; @@ -582,7 +582,7 @@ Error ScriptClassParser::parse(const String &p_code) { if (full_name.length()) full_name += "."; full_name += class_decl.name; - OS::get_singleton()->print("Ignoring generic class declaration: %s\n", class_decl.name.utf8().get_data()); + OS::get_singleton()->print("Ignoring generic class declaration: %s\n", full_name.utf8().get_data()); } } } -- cgit v1.2.3