mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-14 07:02:50 +02:00
MG: fixed finddeclaration Result in with statement
git-svn-id: trunk@1728 -
This commit is contained in:
parent
5688e3f382
commit
e77137ac52
@ -131,7 +131,8 @@ const
|
||||
ctnProcedureType,ctnSetType,ctnRangeType,ctnEnumerationType,
|
||||
ctnEnumIdentifier,ctnLabelType,ctnTypeType,ctnFileType,ctnPointerType,
|
||||
ctnClassOfType,ctnVariantType];
|
||||
AllPascalStatements = [ctnBeginBlock,ctnWithStatement,ctnCaseStatement];
|
||||
AllPascalStatements = [ctnBeginBlock,ctnWithStatement,ctnWithVariable,
|
||||
ctnCaseStatement,ctnCaseVariable];
|
||||
AllSourceTypes =
|
||||
[ctnProgram,ctnPackage,ctnLibrary,ctnUnit];
|
||||
AllUsableSourceTypes =
|
||||
|
@ -47,12 +47,12 @@ interface
|
||||
|
||||
// activate for debug:
|
||||
|
||||
{ $DEFINE CTDEBUG}
|
||||
{$DEFINE CTDEBUG}
|
||||
{ $DEFINE ShowSearchPaths}
|
||||
{ $DEFINE ShowTriedFiles}
|
||||
{ $DEFINE ShowTriedContexts}
|
||||
{ $DEFINE ShowTriedIdentifiers}
|
||||
{ $DEFINE ShowExprEval}
|
||||
{$DEFINE ShowExprEval}
|
||||
{ $DEFINE ShowFoundIdentifier}
|
||||
{ $DEFINE ShowInterfaceCache}
|
||||
{ $DEFINE ShowNodeCache}
|
||||
@ -2976,10 +2976,12 @@ var
|
||||
|
||||
procedure InitAtomQueue;
|
||||
begin
|
||||
//writeln('AAA1');
|
||||
if StartPos<1 then
|
||||
StartPos:=FindStartOfVariable(EndPos)
|
||||
else if EndPos<1 then
|
||||
EndPos:=FindEndOfVariable(StartPos,true);
|
||||
//writeln('AAA2');
|
||||
if (StartPos<1) then
|
||||
RaiseException('internal codetool error: FindExpressionTypeOfVariable '
|
||||
+' StartPos='+IntToStr(StartPos)+' EndPos='+IntToStr(EndPos));
|
||||
@ -3053,10 +3055,10 @@ var
|
||||
begin
|
||||
if (CurContext.Node<>nil) then begin
|
||||
// check if at the end of the variable
|
||||
if (NextAtom.EndPos>EndPos) and (fdfFindVariable in StartFlags) then
|
||||
if IsIdentifierEndOfVariable and (fdfFindVariable in StartFlags) then
|
||||
// the variable is wanted, not its type
|
||||
exit;
|
||||
|
||||
|
||||
// find base type
|
||||
Exclude(Params.Flags,fdfFunctionResult);
|
||||
ExprType:=CurContext.Tool.ConvertNodeToExpressionType(CurContext.Node,
|
||||
|
Loading…
Reference in New Issue
Block a user