mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-03 06:59:17 +02:00
codetools: fixed resolving dot after class, bug #28876
git-svn-id: trunk@50100 -
This commit is contained in:
parent
046db1ccaf
commit
a5c1278946
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1015,6 +1015,7 @@ components/codetools/tests/laztests/bug28861_unit1.pas svneol=native#text/plain
|
||||
components/codetools/tests/laztests/bug28861_unit2.pas svneol=native#text/plain
|
||||
components/codetools/tests/laztests/bug28866_prg.pas svneol=native#text/plain
|
||||
components/codetools/tests/laztests/bug28866_unit1.pas svneol=native#text/plain
|
||||
components/codetools/tests/laztests/bug28876.pas svneol=native#text/plain
|
||||
components/codetools/tests/laztests/tdefaultproperty1.pas svneol=native#text/plain
|
||||
components/codetools/tests/parsertbase.pas svneol=native#text/plain
|
||||
components/codetools/tests/parsertest.lpi svneol=native#text/plain
|
||||
|
@ -8235,7 +8235,7 @@ var
|
||||
begin
|
||||
aTool:=ExprType.Context.Tool;
|
||||
{$IFDEF ShowExprEval}
|
||||
debugln([' FindExpressionTypeOfTerm ResolveChildren used unit -> interface node ',dbgstr(ExprType.Context.Tool.ExtractNode(ExprType.Context.Node,[]))]);
|
||||
debugln([' FindExpressionTypeOfTerm ResolveUseUnit used unit -> interface node ',dbgstr(ExprType.Context.Tool.ExtractNode(ExprType.Context.Node,[]))]);
|
||||
{$ENDIF}
|
||||
AnUnitName:=aTool.ExtractUsedUnitName(ExprType.Context.Node,@InFilename);
|
||||
NewCodeTool:=aTool.FindCodeToolForUsedUnit(AnUnitName,InFilename,true);
|
||||
@ -8283,9 +8283,7 @@ var
|
||||
end
|
||||
else if (ExprType.Context.Node.Desc=ctnClassOfType) then begin
|
||||
// 'class of' => jump to the class
|
||||
ExprType.Desc:=xtContext;
|
||||
Params.Flags:=Params.Flags+[fdfFunctionResult,fdfFindChildren];
|
||||
ExprType.Context.Node:=ExprType.Context.Node.FirstChild;
|
||||
ExprType.Context:=ExprType.Context.Tool.FindBaseTypeOfNode(Params,ExprType.Context.Node.FirstChild);
|
||||
end
|
||||
else if (ExprType.Desc=xtContext)
|
||||
and (ExprType.Context.Node.Desc=ctnPointerType)
|
||||
|
@ -40,7 +40,7 @@
|
||||
<PackageName Value="fpcunitconsolerunner"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="13">
|
||||
<Units Count="9">
|
||||
<Unit0>
|
||||
<Filename Value="finddeclarationtest.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
@ -77,22 +77,6 @@
|
||||
<Filename Value="fdt_with.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit8>
|
||||
<Unit9>
|
||||
<Filename Value="fpctests/tdefaultproperty1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit9>
|
||||
<Unit10>
|
||||
<Filename Value="fpctests/README.txt"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
<Filename Value="laztests/bug28866_prg.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit11>
|
||||
<Unit12>
|
||||
<Filename Value="laztests/bug28866_unit1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit12>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
|
13
components/codetools/tests/laztests/bug28876.pas
Normal file
13
components/codetools/tests/laztests/bug28876.pas
Normal file
@ -0,0 +1,13 @@
|
||||
program bug28876;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
Classes;
|
||||
Var
|
||||
AClass : TClass;
|
||||
begin
|
||||
AClass := TObject;
|
||||
AClass.ClassName{declaration:system.TObject.ClassName};
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user