mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 16:40:32 +02:00
codetools: allowed: var identifier: class of identifier
git-svn-id: trunk@10222 -
This commit is contained in:
parent
01c3d62fc8
commit
e5fdfd28ff
@ -3021,9 +3021,14 @@ var
|
||||
ChildCreated: boolean;
|
||||
ClassAtomPos: TAtomPosition;
|
||||
Level: integer;
|
||||
ContextDesc: Word;
|
||||
begin
|
||||
if not (CurNode.Desc in [ctnTypeDefinition,ctnGenericType]) then
|
||||
ContextDesc:=CurNode.Desc;
|
||||
if not (ContextDesc in [ctnTypeDefinition,ctnGenericType,
|
||||
ctnVarDefinition,ctnConstDefinition])
|
||||
then begin
|
||||
SaveRaiseExceptionFmt(ctsAnonymDefinitionsAreNotAllowed,['class']);
|
||||
end;
|
||||
if (LastUpAtomIs(0,'PACKED')) then begin
|
||||
ClassAtomPos:=LastAtoms.GetValueAt(0);
|
||||
end else begin
|
||||
@ -3051,6 +3056,9 @@ begin
|
||||
ReadNextAtom;
|
||||
if CurPos.Flag<>cafSemicolon then
|
||||
RaiseCharExpectedButAtomFound(';');
|
||||
end else if not (ContextDesc in [ctnTypeDefinition,ctnGenericType]) then begin
|
||||
MoveCursorToNodeStart(CurNode);
|
||||
SaveRaiseExceptionFmt(ctsAnonymDefinitionsAreNotAllowed,['class']);
|
||||
end else if (CurPos.Flag=cafRoundBracketOpen) then begin
|
||||
// read inheritage brackets
|
||||
ReadTilBracketClose(true);
|
||||
|
@ -145,7 +145,16 @@ end;
|
||||
|
||||
function GetDefaultLCLWidgetType: string;
|
||||
begin
|
||||
Result:=WidgetSet.WidgetSetName;
|
||||
if WidgetSet<>nil then
|
||||
Result:=WidgetSet.WidgetSetName
|
||||
else begin
|
||||
{$IFDEF MSWindows}{$DEFINE WidgetSetDefined}
|
||||
Result:='win32';
|
||||
{$ENDIF}
|
||||
{$IFNDEF WidgetSetDefined}
|
||||
Result:='gtk';
|
||||
{$ENDIF}
|
||||
end;
|
||||
end;
|
||||
|
||||
function GetDefaultLCLLibPaths(const Prefix, Postfix, Separator: string): string;
|
||||
|
Loading…
Reference in New Issue
Block a user