Explorar o código

* Do not insert a widestring <-> ansistring conversion node when checking for (un)equal empty string.

Michael VAN CANNEYT %!s(int64=2) %!d(string=hai) anos
pai
achega
1388f90afa
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      compiler/nadd.pas

+ 4 - 2
compiler/nadd.pas

@@ -2827,9 +2827,11 @@ implementation
                   st_unicodestring :
                     begin
                       if not(is_unicodestring(rd)) then
-                        inserttypeconv(right,cunicodestringtype);
+                        if not ((ld.size=0) and (nodetype in [equaln,unequaln])) then
+                          inserttypeconv(right,cunicodestringtype);
                       if not(is_unicodestring(ld)) then
-                        inserttypeconv(left,cunicodestringtype);
+                        if not ((rd.size=0) and (nodetype in [equaln,unequaln])) then
+                          inserttypeconv(left,cunicodestringtype);
                     end;
                   st_ansistring :
                     begin