…ts#246)
The parser rejected 'packed record', 'packed array' and 'packed set' in
script type sections and AddTypeS declarations, although PascalScript
records and arrays are always packed anyway - Delphi type declarations
could not be pasted into scripts unchanged.
ReadType now skips a leading 'packed' when a structured type
(record/array/set) follows; anything else after 'packed' is still an
error, and the memory layout is unaffected.
Repro (fails on master, passes with this change, DCC32+DCC64):
type TP = packed record x, y: Integer; end; // script type section
Sender.AddTypeS('THostPacked', 'packed record a: Byte; b: Integer; end');
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The parser rejected 'packed record', 'packed array' and 'packed set' in
script type sections and AddTypeS declarations, although PascalScript
records and arrays are always packed anyway - Delphi type declarations
could not be pasted into scripts unchanged.
ReadType now skips a leading 'packed' when a structured type
(record/array/set) follows; anything else after 'packed' is still an
error, and the memory layout is unaffected.
Repro (fails on master, passes with this change, DCC32+DCC64):
type TP = packed record x, y: Integer; end; // script type section
Sender.AddTypeS('THostPacked', 'packed record a: Byte; b: Integer; end');
Fixes #246.
🤖 Generated with Claude Code