1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Merge pull request #108306 from Chaosus/gds_fix_super_completion

Fix lookup symbol for `super()`
This commit is contained in:
Thaddeus Crews
2025-07-17 10:34:48 -05:00
4 changed files with 30 additions and 1 deletions

View File

@@ -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: