I just noticed this by accident and I don't understand. Why does " x := @r; " compile? I would expect it to fail like the next line where I cast to the explicit type.
type
TMyRec = record end;
PMyRec = ^TMyRec;
var
x: PByte;
r: TMyRec;
begin
x := @r; // works
x := PMyRec(@r); // fails
end
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
