Why do I get “type has no typeinfo” error with an enum type

Discontiguous enumerations, and enumerations which don’t start at zero, don’t have typeinfo. For typeinfo to be implemented, it would need to be in a different format from the existing tkEnumeration, owing to backward compatibility issues.

I considered implementing a tkDiscontiguousEnumeration (or possibly better named member) for Delphi 2010, but the benefit seemed small considering their relative scarcity and the difficulties in enumeration – how do you encode the ranges efficiently? Some encodings are better for some scenarios, worse for others.

Leave a Comment