From 3222dc18bcec5b671d8030ffb13179d5060678ed Mon Sep 17 00:00:00 2001 From: inoussa Date: Tue, 19 Nov 2013 15:25:37 +0000 Subject: [PATCH] FPC-2.6.2 compatibility fix git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2842 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- wst/trunk/ws_helper/xsd_parser.pas | 19 ++++++++++++++++++- wst/trunk/wst_global.inc | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/wst/trunk/ws_helper/xsd_parser.pas b/wst/trunk/ws_helper/xsd_parser.pas index 532d89cf1..cd08ba01b 100644 --- a/wst/trunk/ws_helper/xsd_parser.pas +++ b/wst/trunk/ws_helper/xsd_parser.pas @@ -209,6 +209,23 @@ begin Result := ANode.NodeValue; end; +function HasProp(AClass : TPasClassType; const AProp : string) : Boolean; +var + i : Integer; + ml : TList2; + e : TPasElement; +begin + Result := False; + ml := AClass.Members; + for i := 0 to ml.Count - 1 do begin + e := TPasElement(ml[i]); + if e.InheritsFrom(TPasProperty) and SameText(e.Name,AProp) then begin + Result := True; + Break; + end; + end; +end; + procedure CheckDuplicatedProperties( AClassList : TList2; ASymbolTable : TwstPasTreeContainer @@ -240,7 +257,7 @@ begin e := TPasElement(locItem.Members[k]); if not e.InheritsFrom(TPasProperty) then Continue; - if (TPasClassType(locAncestor).FindMember(TPasProperty,e.Name) <> nil) then begin + if HasProp(TPasClassType(locAncestor),e.Name) then begin locItem.Members.Delete(k); e.Release(); Continue; diff --git a/wst/trunk/wst_global.inc b/wst/trunk/wst_global.inc index 66045ea5d..f3542be62 100644 --- a/wst/trunk/wst_global.inc +++ b/wst/trunk/wst_global.inc @@ -59,7 +59,7 @@ {$IF Defined(FPC_FULLVERSION) and (FPC_FULLVERSION >= 20600) } {$DEFINE HAS_DEFAULT_FORMAT_SETTINGS} {$IFEND} - {$IF Defined(FPC_FULLVERSION) and (FPC_FULLVERSION > 20601) } + {$IF Defined(FPC_FULLVERSION) and (FPC_FULLVERSION > 20602) } {$DEFINE HAS_EXP_TREE} {$IFEND} {$ENDIF}