Allow enum properties to be compared to integers

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1484 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
inoussa 2011-02-02 15:42:43 +00:00
parent 848a2159be
commit e99fbdfde3

View File

@ -419,8 +419,12 @@ var
raise ERttiFilterException.CreateFmt('Unexpected symbol : "%s".',[s]);
MoveNext();
end;
prsr.CheckToken(toSymbol);
AFltrCrtr.AddCondition(propName,fltrOp,prsr.TokenString(),lastCntr);
if (prsr.Token = toInteger) then begin
AFltrCrtr.AddCondition(propName,fltrOp,prsr.TokenInt,lastCntr)
end else begin
prsr.CheckToken(toSymbol);
AFltrCrtr.AddCondition(propName,fltrOp,prsr.TokenString(),lastCntr);
end;
end;
var