Wrong script code results in a crash

Issue #79 resolved
Christian Budde created an issue

The obviously wrong script code below results in a crash:

type
  TFoo = class
  public
    procedure Bar(callback: procedure);
  end;  

var Foo: TFoo;
Foo.Bar(@);

while it should just fail to compile with a proper error message.

It crashes in:

function ReadAt(expecting : TTypeSymbol = nil) : TTypedExpr;
[...]
   Result:=ReadTerm(isWrite, expecting);
   if (Result.Typ=nil) or (Result.Typ.AsFuncSymbol=nil) then begin
[...]

when Result = nil

Comments (2)

  1. Log in to comment