mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Merge pull request #108306 from Chaosus/gds_fix_super_completion
Fix lookup symbol for `super()`
This commit is contained in:
commit
25dcf7d2a0
4 changed files with 30 additions and 1 deletions
|
|
@ -3807,6 +3807,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;
|
||||
|
|
@ -4367,6 +4369,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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue