mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 19:42:43 +00:00
Merge pull request #90968 from raulsntos/fix-gdscript-analyzer-with-overloaded-dotnet-methods
C#: Don't return MethodInfo for overloaded methods
This commit is contained in:
commit
2b42352c99
@ -2519,13 +2519,20 @@ MethodInfo CSharpScript::get_method_info(const StringName &p_method) const {
|
||||
return MethodInfo();
|
||||
}
|
||||
|
||||
MethodInfo mi;
|
||||
for (const CSharpMethodInfo &E : methods) {
|
||||
if (E.name == p_method) {
|
||||
return E.method_info;
|
||||
if (mi.name == p_method) {
|
||||
// We already found a method with the same name before so
|
||||
// that means this method has overloads, the best we can do
|
||||
// is return an empty MethodInfo.
|
||||
return MethodInfo();
|
||||
}
|
||||
mi = E.method_info;
|
||||
}
|
||||
}
|
||||
|
||||
return MethodInfo();
|
||||
return mi;
|
||||
}
|
||||
|
||||
Variant CSharpScript::callp(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
|
||||
|
Loading…
Reference in New Issue
Block a user