diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-03-30 17:58:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-30 17:58:11 +0200 |
commit | 5ba3b993d5889f2c9f8a1ebdf6854e5f675fd148 (patch) | |
tree | 4d48a5208f427c1b4b5c018b3b23b7809a41cf73 /modules/gdscript/gdscript_parser.cpp | |
parent | 543c5658ba207d07e3f78f2bf3255aae2c8020c6 (diff) | |
parent | be718285f7d60c12623d53b5f6250733fa667431 (diff) |
Merge pull request #59694 from vnen/gdscript-better-call-super
Diffstat (limited to 'modules/gdscript/gdscript_parser.cpp')
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 0efbdd00f9..67d778f932 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -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); |