[fpc-devel] WTF? Type checking dependent on compilation mode!?

Vinzent Hoefler JeLlyFish.software at gmx.net
Mon Apr 25 13:28:26 CEST 2005


Hi,

consider this piece of code:

-- 8< -- snip --
type
   tA = array[0 .. 5] of byte;
   tB = array[0 .. 5] of byte;

var
   A : tA;
   B : tB;

begin
   FillChar (A, SizeOf (A), 0);

   B := A;     // <-- should by type error!
   A := tA(B);
end.
-- 8< -- snip --





More information about the fpc-devel mailing list