From be718285f7d60c12623d53b5f6250733fa667431 Mon Sep 17 00:00:00 2001 From: George Marques Date: Wed, 30 Mar 2022 11:53:49 -0300 Subject: GDScript: Fix issues with completion and `super` calls - Make call errors use the call node instead of the calle, which will be empty on super calls. - Don't allow `super()` to be used within lambdas. --- modules/gdscript/gdscript_parser.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/gdscript/gdscript_parser.cpp') diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 10709d3667..310fc14ecf 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(""); + } } else { consume(GDScriptTokenizer::Token::PERIOD, R"(Expected "." or "(" after "super".)"); make_completion_context(COMPLETION_SUPER_METHOD, call, true); -- cgit v1.2.3