mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-24 02:49:19 +02:00
* Last field before end does not need a semicolon
git-svn-id: trunk@47496 -
(cherry picked from commit 185048c631
)
This commit is contained in:
parent
adb4af12a0
commit
388ffe420e
@ -7308,6 +7308,8 @@ begin
|
|||||||
if not (AType.ObjKind in okWithFields) then
|
if not (AType.ObjKind in okWithFields) then
|
||||||
ParseExc(nParserNoFieldsAllowed,SParserNoFieldsAllowedInX,[ObjKindNames[AType.ObjKind]]);
|
ParseExc(nParserNoFieldsAllowed,SParserNoFieldsAllowedInX,[ObjKindNames[AType.ObjKind]]);
|
||||||
ParseClassFields(AType,CurVisibility,CurSection=stClassVar);
|
ParseClassFields(AType,CurVisibility,CurSection=stClassVar);
|
||||||
|
if Curtoken=tkEnd then // case Ta = Class x : String end;
|
||||||
|
UngetToken;
|
||||||
HaveClass:=False;
|
HaveClass:=False;
|
||||||
end;
|
end;
|
||||||
stClassVar:
|
stClassVar:
|
||||||
|
@ -981,7 +981,6 @@ end;
|
|||||||
procedure TTestClassType.TestNoSemicolon;
|
procedure TTestClassType.TestNoSemicolon;
|
||||||
begin
|
begin
|
||||||
StartClass;
|
StartClass;
|
||||||
fDecl.Add('X : Integer;');
|
|
||||||
fDecl.Add('Y : String');
|
fDecl.Add('Y : String');
|
||||||
ParseClass;
|
ParseClass;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user