tw9039a.pp 340 B

1234567891011121314151617
  1. { %fail }
  2. { the reason this compiles is that tdef.size and tabstractvarsym.getsize }
  3. { both return an aint, and then the size of ta is reported as low(aint) }
  4. type
  5. ta = array[0..high(ptrint)] of byte;
  6. tr = packed record
  7. a: byte;
  8. case byte of
  9. 0: (l: longint);
  10. 1: (e: ta);
  11. end;
  12. begin
  13. writeln(sizeof(ta));
  14. end.