Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

iOS JIT compile error on Generic method called with basic types (int, bool, float)

$
0
0
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!

Viewing all articles
Browse latest Browse all 4709

Trending Articles