mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-01-12 13:41:34 +01:00
20 lines
310 B
ObjectPascal
20 lines
310 B
ObjectPascal
{ %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
|
|
end;
|
|
|
|
begin
|
|
Test(TTest(nil^)); {case 1}
|
|
Test(TTest(Pointer(nil)^)); {case 2}
|
|
end.
|