Generic type 'T' not available at runtime


(Peter Tribe) #1

Been trying so code which boils down to something like this…

public class DemoClass
{
public T someMethod()
{
var a = typeOf(T);
}
}

But when i compile i get Generic type ‘T’ not available at runtime should this compile or is it a limitation?


(marc hoffman) #2

It’s a limitation of the Java (and Cocoa?) platforms, due to how genetics work.