The answer is no. Anything else would be a compiler error.
tkUnknown is an indication of the lack of type information that may occur for non-contiguous enumerations and enumerations that do not start from scratch (as Barry explains here ) and some types from ancient times (for example, Real48 ).
It also returns TValue.Kind when TValue.IsEmpty is true. (since XE2 afaik could also return True before, in those cases when it contained a reference type, which was zero, which was an error).
When you retrieve RTTI for something that does not contain type information (such as a field, property, or type parameter that does not have type information), your RTTI information is incomplete. TRttiField.FieldType and TRttiProperty.PropertyType return zero in these cases, and the array returned by TRttiMethod.GetParameters is incomplete.
Although you can call TValue.Make<T> with a type that does not have type information, you cannot do much with this because its TypeInfo will be zero. The compiler obviously runs around E2134 and passes nil to TValue.Make . So TValue.Kind will say tkUnknown .
Stefan glienke
source share