nil meta parameter



nil_meta_parameter
Smart pascal source code
procedure Test1(p: TClass); begin if p <> nil then WriteLn('bug'); end; Test1(nil); procedure Test2(p: array of TClass); begin if p[0] = nil then WriteLn('ok'); end; Test2([nil]); {<<< RESULT - CONSOLE LOG >>> ----------------------------- ok ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}