Pārlūkot izejas kodu

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.
Ignacio Etcheverry 5 gadi atpakaļ
vecāks
revīzija
f2a2293709
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      modules/mono/editor/script_class_parser.cpp

+ 2 - 2
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());
 					}
 				}
 			}