mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 16:09:27 +02:00
* Fix bug ID #31702, no semicolon required before finalization
git-svn-id: trunk@35933 -
This commit is contained in:
parent
a437e6ff5d
commit
4d6174f9ef
@ -4653,6 +4653,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
tkSemiColon:
|
tkSemiColon:
|
||||||
if CloseStatement(true) then break;
|
if CloseStatement(true) then break;
|
||||||
|
tkFinalization:
|
||||||
|
if CloseStatement(true) then break;
|
||||||
tkuntil:
|
tkuntil:
|
||||||
begin
|
begin
|
||||||
if CloseStatement(true) then
|
if CloseStatement(true) then
|
||||||
|
@ -117,6 +117,7 @@ Type
|
|||||||
Procedure TestAsmBlockInIfThen;
|
Procedure TestAsmBlockInIfThen;
|
||||||
Procedure TestGotoInIfThen;
|
Procedure TestGotoInIfThen;
|
||||||
procedure AssignToAddress;
|
procedure AssignToAddress;
|
||||||
|
procedure FinalizationNoSemicolon;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -1703,6 +1704,19 @@ begin
|
|||||||
ParseModule;
|
ParseModule;
|
||||||
end;
|
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;
|
Procedure TTestStatementParser.TestGotoInIfThen;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user