public class ComponentDetail(T) : Component {/////////////////////////////////////////////////////////////// Component's ID as static member. public static hash_t ID = typeid(T).toHash;
typeid(T).toHash can not be evaluated by the compiler at compile-time.
Placing the ID initalization in a static this should fix the problem.
eg.
public static hash_t ID;
static this()
{
ID = typeid(T).toHash;
}
