mirror of
https://github.com/godotengine/godot.git
synced 2025-10-28 04:04:24 +00:00
Don't pass self when calling a static function from a non-static context
This commit is contained in:
parent
79de2eaae7
commit
164b34a734
3 changed files with 6 additions and 4 deletions
|
|
@ -648,7 +648,7 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code
|
|||
// Not exact arguments, but still can use method bind call.
|
||||
gen->write_call_method_bind(result, self, method, arguments);
|
||||
}
|
||||
} else if (codegen.is_static || (codegen.function_node && codegen.function_node->is_static) || call->function_name == "new") {
|
||||
} else if (call->is_static || codegen.is_static || (codegen.function_node && codegen.function_node->is_static) || call->function_name == "new") {
|
||||
GDScriptCodeGenerator::Address self;
|
||||
self.mode = GDScriptCodeGenerator::Address::CLASS;
|
||||
if (is_awaited) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue