Correct test for string-based type (optional)properties (for storage)

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1483 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
inoussa 2011-02-02 15:37:47 +00:00
parent 2e55ad976d
commit 848a2159be

View File

@ -2560,12 +2560,14 @@ var
Indent();
pte := FSymbolTable.FindElement(p.VarType.Name);
if ( pte <> nil ) and pte.InheritsFrom(TPasType) then begin
if pte.InheritsFrom(TPasUnresolvedTypeRef) then
pte := SymbolTable.FindElement(SymbolTable.GetExternalName(pte));
pt := pte as TPasType;
pt := GetUltimeType(pt);
if pt.InheritsFrom(TPasEnumType) then begin
WriteLn('Result := True;');
end else if pt.InheritsFrom(TPasNativeSimpleType) and
( AnsiPos('string', pt.Name) > 0 )
( AnsiPos('string', LowerCase(pt.Name)) > 0 )
then begin
WriteLn('Result := ( F%s <> '''' );',[p.Name]);
end else if pt.InheritsFrom(TPasNativeSimpleType) and