try except without end; - breaking compilation

Issue #227 resolved
Alex Bespalov created an issue
program G1;

procedure test;
begin
  try
    PrintLn('a1');
    PrintLn('a2');
  except
    PrintLn('a3');
//  end;
end;

begin
  test();
end.

Compilation stopped without any error or message.

Ofc its not critical, but strange behaviour.

Comments (4)

  1. Eric Grange repo owner

    This is because in DWScript this falls under Delphi compatibility mode, the “program” statement is essentially ignored, the final begin..end block to wrap the call is unnecessary, and the “end.” is unnecessary as well, so this stresses the compatibility mode testing 😉

  2. Alex Bespalov reporter
    • changed status to open

    edited.

    Strange, after re-sync GIT repo problem gone.

    Sorry for raising resolved issue :)

  3. Log in to comment