You are not logged in.
Delphi added the typeinfo type tkMRecord (managed records) that it is not included in TRttiKind and this causes an out of range error and can not be serialized
Offline
I don't have access to the latest Delphi revision.
Oddly enough, this seems not reflected in the documentation:
https://docwiki.embarcadero.com/Librari … .TTypeKind
So I have a add a rkMRecord after rkProcedure, right?
Do you know if the RTTI layout changed a lot in respect to regular tkRecord ?
Offline
// Sync with compiler internals
TTypeKind = (tkUnknown, tkInteger, tkChar, tkEnumeration, tkFloat,
tkString, tkSet, tkClass, tkMethod, tkWChar, tkLString, tkWString,
tkVariant, tkArray, tkRecord, tkInterface, tkInt64, tkDynArray, tkUString,
tkClassRef, tkPointer, tkProcedure, tkMRecord);
Offline
So the Delphi documentation is not accurate.
I have added minimal managed records support on latest Delphi.
Please see
https://github.com/synopse/mORMot2/commit/274f996a
But we don't support custom initialization/finalization yet: a managed record is just filled with zero, and its managed fields memory released (similar limitation applies to FPC managed records).
Thanks for the feedback.
Offline
Thanks a lot @ab
Offline