codetools: parse guid in dispinterface, bug #32742

git-svn-id: trunk@56520 -
This commit is contained in:
mattias 2017-11-28 09:19:47 +00:00
parent ec8cc2e82f
commit 5b565ad568
2 changed files with 4 additions and 3 deletions

View File

@ -12870,7 +12870,8 @@ begin
{$IFDEF ShowForInEval}
DebugLn(['TFindDeclarationTool.FindEnumeratorOfClass EnumeratorContext=',FindContextToString(EnumeratorContext)]);
{$ENDIF}
if (EnumeratorContext.Node=nil) or not(EnumeratorContext.Node.Desc in [ctnClass,ctnClassInterface,ctnRecordType])
if (EnumeratorContext.Node=nil)
or not (EnumeratorContext.Node.Desc in [ctnClass,ctnClassInterface,ctnRecordType])
then begin
if ExceptionOnNotFound then begin
ProcTool.MoveCursorToCleanPos(ProcNode.StartPos);
@ -12983,7 +12984,7 @@ begin
DebugLn(['TFindDeclarationTool.FindOperatorEnumerator ClassContext=',FindContextToString(ClassContext)]);
{$ENDIF}
case ClassContext.Node.Desc of
ctnClass,ctnObject,ctnRecordType,ctnClassInterface: ;
ctnClass,ctnObject,ctnRecordType,ctnClassInterface,ctnDispinterface: ;
else
OperatorTool.MoveCursorToNodeStart(OperatorNode);
OperatorTool.RaiseException(20170421200650,'operator enumerator result type is not object');

View File

@ -4356,7 +4356,7 @@ begin
// start the first class section (the one without a keyword)
CreateChildNode;
CurNode.Desc:=ctnClassRequired;
end else if IntfDesc=ctnClassInterface then begin
end else if IntfDesc in [ctnClassInterface,ctnDispinterface] then begin
if CurPos.Flag=cafEdgedBracketOpen then
ReadGUID;
end;