You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user