-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't call C# static function #86256
Comments
This is a weird error when parsing GDScript, but the static function do works: var klass = CsMain
var a = klass.F1()
print(a) # prints 123 |
@CsloudX You didn't finish uploading the MRP. Please do not click away from the template field until it is done uploading next time you submit an issue. For this one, could you please re-upload it? |
Sorry about that, and I'm upload a new MRP. |
This is caused when lookup MethodInfo from CSharpScript: godot/modules/gdscript/gdscript_analyzer.cpp Lines 5016 to 5018 in bf8dd73
Line 238 in bf8dd73
The |
It this fixed by #86259? |
It recognizes the static function now but gives an incorrect return type. [GlobalClass]
public partial class Main : Node
{
public static int Add(int a, int b) => a + b;
// ...
}
|
Tested versions
v4.2.1.stable.mono.official [b09f793]
System information
Godot v4.2.1.stable.mono - Windows 10.0.17763 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2060 (NVIDIA; 31.0.15.2849) - AMD Ryzen 9 5950X 16-Core Processor (32 Threads)
Issue description
Steps to reproduce
.
Minimal reproduction project (MRP)
CSStaticTest.zip
The text was updated successfully, but these errors were encountered: