I have a generic method like this:
public class MyClass
{
public T MyMethod(string arg)
{
return default(T);
}
}
When I try to call the method like this:
int someInt = MyClassInstance.MyMethod("some_string");
I get the following error:
Attempting to JIT compile method 'MyClass.MyMethod (string)' while running with --aot-only.
This also happens to bool and float types but it works for string.
Would you guys know why this happens? Thanks!
↧