Fix lookup symbol for super()

This commit is contained in:
Chaosus 2025-07-08 16:07:08 +03:00
parent 4d1f26e1fd
commit c232b7c717
4 changed files with 30 additions and 1 deletions

View file

@ -3755,6 +3755,8 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c
}
}
} break;
case GDScriptParser::COMPLETION_SUPER:
break;
case GDScriptParser::COMPLETION_SUPER_METHOD: {
if (!completion_context.current_class) {
break;
@ -4315,6 +4317,13 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co
return OK;
}
} break;
case GDScriptParser::COMPLETION_SUPER: {
if (context.current_class && context.current_function) {
if (_lookup_symbol_from_base(context.current_class->base_type, context.current_function->info.name, r_result) == OK) {
return OK;
}
}
} break;
case GDScriptParser::COMPLETION_SUPER_METHOD:
case GDScriptParser::COMPLETION_METHOD:
case GDScriptParser::COMPLETION_ASSIGN: