diff --git a/Source/changelog.txt b/Source/changelog.txt index b65ed1f..5be496f 100644 --- a/Source/changelog.txt +++ b/Source/changelog.txt @@ -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 diff --git a/Source/uPSCompiler.pas b/Source/uPSCompiler.pas index aaf3c4d..bb8ef28 100644 --- a/Source/uPSCompiler.pas +++ b/Source/uPSCompiler.pas @@ -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