Merge pull request #59694 from vnen/gdscript-better-call-super

This commit is contained in:
Rémi Verschelde 2022-03-30 17:58:11 +02:00 committed by GitHub
commit 5ba3b993d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 5 deletions

View file

@ -2752,7 +2752,11 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_call(ExpressionNode *p_pre
pop_multiline();
return nullptr;
}
call->function_name = current_function->identifier->name;
if (current_function->identifier) {
call->function_name = current_function->identifier->name;
} else {
call->function_name = SNAME("<anonymous>");
}
} else {
consume(GDScriptTokenizer::Token::PERIOD, R"(Expected "." or "(" after "super".)");
make_completion_context(COMPLETION_SUPER_METHOD, call, true);