From e653ab6a22e3c3269c50c2ac685131f33b3cd9a6 Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 27 Mar 2007 18:37:30 +0000 Subject: [PATCH] * also try to convert non-set nodes to a set in set operations git-svn-id: trunk@7010 - --- compiler/nadd.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/nadd.pas b/compiler/nadd.pas index c21014f06c..86cd516b83 100644 --- a/compiler/nadd.pas +++ b/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)