diff options
author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2019-12-13 19:55:32 +0100 |
---|---|---|
committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2019-12-13 19:55:32 +0100 |
commit | f2a2293709472f5b4e418b8f38d48eef987cc0de (patch) | |
tree | d500978482162b9e65467fb12a4ae8009e0f8aef | |
parent | c1ab956dd037cf5e3bdbf3d4940c4e7a9421f9b9 (diff) |
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.
-rw-r--r-- | modules/mono/editor/script_class_parser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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()); } } } |