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

Core: Allow methods of built-in Variant types to be used as Callables

This commit is contained in:
Danil Alexeev
2023-09-24 23:33:28 +03:00
parent 06d5189167
commit b04263644c
9 changed files with 231 additions and 73 deletions

View File

@@ -3650,6 +3650,10 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod
return;
}
}
if (Variant::has_builtin_method(base.builtin_type, name)) {
p_identifier->set_datatype(make_callable_type(Variant::get_builtin_method_info(base.builtin_type, name)));
return;
}
if (base.is_hard_type()) {
#ifdef SUGGEST_GODOT4_RENAMES
String rename_hint = String();