* Fix bug ID #31702, no semicolon required before finalization

git-svn-id: trunk@35933 -
This commit is contained in:
michael 2017-04-24 11:08:51 +00:00
parent a437e6ff5d
commit 4d6174f9ef
2 changed files with 16 additions and 0 deletions

View File

@ -4653,6 +4653,8 @@ begin
end;
tkSemiColon:
if CloseStatement(true) then break;
tkFinalization:
if CloseStatement(true) then break;
tkuntil:
begin
if CloseStatement(true) then

View File

@ -117,6 +117,7 @@ Type
Procedure TestAsmBlockInIfThen;
Procedure TestGotoInIfThen;
procedure AssignToAddress;
procedure FinalizationNoSemicolon;
end;
implementation
@ -1703,6 +1704,19 @@ begin
ParseModule;
end;
procedure TTestStatementParser.FinalizationNoSemicolon;
begin
Source.Add('unit afile;');
Source.Add('{$mode objfpc}');
Source.Add('interface');
Source.Add('implementation');
Source.Add('initialization');
Source.Add(' writeln(''qqq'')');
Source.Add('finalization');
Source.Add(' writeln(''qqq'')');
ParseModule;
end;
Procedure TTestStatementParser.TestGotoInIfThen;
begin