mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 20:49:22 +02:00
* Better error message for array types (bug ID 37685, patch from Henrique Werlang)
git-svn-id: trunk@46755 -
This commit is contained in:
parent
3722c820c9
commit
c7628c11c6
@ -1027,20 +1027,27 @@ var
|
|||||||
begin
|
begin
|
||||||
if o=nil then
|
if o=nil then
|
||||||
Result:='nil'
|
Result:='nil'
|
||||||
else if o is TPasElement then
|
else if o is TPasArrayType then
|
||||||
begin
|
begin
|
||||||
Result:=TPasElement(o).Name;
|
if TPasArrayType(o).ElType = nil then
|
||||||
if o is TPasGenericType then
|
Result:='array of const'
|
||||||
begin
|
else
|
||||||
GenType:=TPasGenericType(o);
|
Result:=Format('TArray<%s>', [TPasArrayType(o).ElType.Name]);
|
||||||
if (GenType.GenericTemplateTypes<>nil)
|
|
||||||
and (GenType.GenericTemplateTypes.Count>0) then
|
|
||||||
Result:=Result+GetGenericParamCommas(GenType.GenericTemplateTypes.Count);
|
|
||||||
end;
|
|
||||||
Result:=Result+':'+o.ClassName;
|
|
||||||
end
|
end
|
||||||
else
|
else if o is TPasElement then
|
||||||
Result:=o.ClassName;
|
begin
|
||||||
|
Result:=TPasElement(o).Name;
|
||||||
|
if o is TPasGenericType then
|
||||||
|
begin
|
||||||
|
GenType:=TPasGenericType(o);
|
||||||
|
if (GenType.GenericTemplateTypes<>nil)
|
||||||
|
and (GenType.GenericTemplateTypes.Count>0) then
|
||||||
|
Result:=Result+GetGenericParamCommas(GenType.GenericTemplateTypes.Count);
|
||||||
|
end;
|
||||||
|
Result:=Result+':'+o.ClassName;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Result:=o.ClassName;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function GetObjPath(o: TObject): string;
|
function GetObjPath(o: TObject): string;
|
||||||
|
Loading…
Reference in New Issue
Block a user