- changed status to resolved
Access Violation error raised when comparing method to nil.
Issue #215
resolved
Script:
program test;
type TSomeCallback = procedure( x, y: Integer );
procedure CBmethod( x, y:Integer );
begin
if( x <> 1000 ) and ( y >= 20 ) then
x := 1000;
AddToSystemJournal(x,' ',y);
end;
function Methodwithcalback( x, y:Integer; callback:TSomeCallback ):Boolean;
begin
if callback <> nil then
begin
callback(x,y);
end;
end;
begin
Methodwithcalback(50,100,CBmethod);
end.
If change line 14 to
if Assigned(callback) then
then it works fine, because thats correct way. But anyway, even on maximum it should throw script error, not Access Violation.
Comments (1)
-
repo owner - Log in to comment
Fixed Issue
#215UnAliasedType now supports nil Self + test→ <<cset 04a2ccdce538>>