mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Fix cyclic references in GDScript 2.0
This commit is contained in:
parent
e8f9cd8ac5
commit
5704055d30
20 changed files with 626 additions and 113 deletions
|
@ -648,7 +648,13 @@ GDScriptParser::ClassNode *GDScriptParser::parse_class() {
|
|||
if (consume(GDScriptTokenizer::Token::IDENTIFIER, R"(Expected identifier for the class name after "class".)")) {
|
||||
n_class->identifier = parse_identifier();
|
||||
if (n_class->outer) {
|
||||
n_class->fqcn = n_class->outer->fqcn + "::" + n_class->identifier->name;
|
||||
String fqcn = n_class->outer->fqcn;
|
||||
if (fqcn.is_empty()) {
|
||||
fqcn = script_path;
|
||||
}
|
||||
n_class->fqcn = fqcn + "::" + n_class->identifier->name;
|
||||
} else {
|
||||
n_class->fqcn = n_class->identifier->name;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue