mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 20:20:26 +02:00
19 lines
296 B
ObjectPascal
19 lines
296 B
ObjectPascal
{$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.
|