blob: 9e448ca9be27e33f3ce2d5c1e1221dbb07b9f194 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
{ %cpu=i386 }
{$ifdef fpc}{$mode delphi}{$endif}
uses SysUtils;
type TTest = record
a, b: integer;
end;
procedure Test(const T: TTest);
begin
if @T = nil then exit;
// do something
// halt(1);
end;
begin
Test(TTest(nil^)); {case 1}
Test(TTest(Pointer(nil)^)); {case 2}
end.
|