fix from Fabio Lindner: comparing notification variants with bool

git-svn-id: http://code.remobjects.com/svn/pascalscript@33 5c9d2617-0215-0410-a2ee-e80e04d1c6d8
This commit is contained in:
carlokok 2007-04-05 09:49:22 +00:00
parent 006e13f9fe
commit b75b8f08e6
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,6 @@
April 2007
- 5 apr: Fix by Fabio Lindner: using AND on booleans and notification variants
March 2007
- 2 mar: 0003179: strange assignment result
- 2 mar: 0003180: Type mismatch with currency

View File

@ -7845,7 +7845,8 @@ function TPSPascalCompiler.ProcessSub(BlockInfo: TPSBlockInfo): Boolean;
Result := t2
else if IsIntType(t1.BaseType) and IsIntType(t2.BaseType) then
Result := t1
else if (IsBoolean(t1)) and (t2 = t1) then
else if (IsBoolean(t1)) and ((t2 = t1) or ((t2.BaseType = btVariant)
or (t2.BaseType = btNotificationVariant))) then
begin
Result := t1;
if ((p1.ClassType = TPSValueData) or (p2.ClassType = TPSValueData)) then