mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Remove script class checks when getting function signature
This commit is contained in:
parent
3f02cf7ced
commit
0fef203b1f
13 changed files with 65 additions and 13 deletions
|
@ -591,7 +591,6 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code
|
|||
}
|
||||
} else if (callee->type == GDScriptParser::Node::SUBSCRIPT) {
|
||||
const GDScriptParser::SubscriptNode *subscript = static_cast<const GDScriptParser::SubscriptNode *>(call->callee);
|
||||
|
||||
if (subscript->is_attribute) {
|
||||
// May be static built-in method call.
|
||||
if (!call->is_super && subscript->base->type == GDScriptParser::Node::IDENTIFIER && GDScriptParser::get_builtin_type(static_cast<GDScriptParser::IdentifierNode *>(subscript->base)->name) < Variant::VARIANT_MAX) {
|
||||
|
@ -615,7 +614,7 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code
|
|||
} else {
|
||||
class_name = base.type.native_type == StringName() ? base.type.script_type->get_instance_base_type() : base.type.native_type;
|
||||
}
|
||||
if (ClassDB::class_exists(class_name) && ClassDB::has_method(class_name, call->function_name)) {
|
||||
if (!subscript->base->is_constant && ClassDB::class_exists(class_name) && ClassDB::has_method(class_name, call->function_name)) {
|
||||
MethodBind *method = ClassDB::get_method(class_name, call->function_name);
|
||||
if (_can_use_ptrcall(method, arguments)) {
|
||||
// Exact arguments, use ptrcall.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue