Browse Source

* also try to convert non-set nodes to a set in set operations

git-svn-id: trunk@7010 -
peter 18 years ago
parent
commit
e653ab6a22
1 changed files with 4 additions and 4 deletions
  1. 4 4
      compiler/nadd.pas

+ 4 - 4
compiler/nadd.pas

@@ -1149,10 +1149,10 @@ implementation
              begin
                if not(nodetype in [addn,subn,symdifn,muln,equaln,unequaln,lten,gten]) then
                 CGMessage(type_e_set_operation_unknown);
-               { if the right side is also a setdef then the settype must
-                 be the same as the left setdef }
-               if (rd.typ=setdef) and
-                  not(equal_defs(ld,rd)) then
+               { make operands the same setdef, if right is a normalset or varset then
+                 force the left side to be the same. General fallback also for non-set nodes
+                 is to convert right to a set }
+               if not(equal_defs(ld,rd)) then
                 begin
                   if is_varset(rd) or is_normalset(rd) then
                     inserttypeconv(left,right.resultdef)