mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-18 05:00:07 +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;
|
||||
tkSemiColon:
|
||||
if CloseStatement(true) then break;
|
||||
tkFinalization:
|
||||
if CloseStatement(true) then break;
|
||||
tkuntil:
|
||||
begin
|
||||
if CloseStatement(true) then
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user