Bladeren bron

Merged revisions 979-980 via svnmerge from
/trunk

git-svn-id: branches/fixes_2_0@1009 -

peter 20 jaren geleden
bovenliggende
commit
2b359f01b3
3 gewijzigde bestanden met toevoegingen van 16 en 2 verwijderingen
  1. 1 0
      .gitattributes
  2. 6 2
      compiler/defcmp.pas
  3. 9 0
      tests/webtbs/tw4336.pp

+ 1 - 0
.gitattributes

@@ -6008,6 +6008,7 @@ tests/webtbs/tw4247.pp svneol=native#text/plain
 tests/webtbs/tw4253.pp svneol=native#text/plain
 tests/webtbs/tw4260.pp svneol=native#text/plain
 tests/webtbs/tw4277.pp svneol=native#text/plain
+tests/webtbs/tw4336.pp svneol=native#text/plain
 tests/webtbs/ub1873.pp svneol=native#text/plain
 tests/webtbs/ub1883.pp svneol=native#text/plain
 tests/webtbs/uw0555.pp svneol=native#text/plain

+ 6 - 2
compiler/defcmp.pas

@@ -344,7 +344,7 @@ implementation
                             if is_ansistring(def_to) then
                               eq:=te_convert_l1
                             else if is_widestring(def_to) then
-                              eq:=te_convert_l2
+                              eq:=te_convert_l3
                             else
                               eq:=te_convert_l2;
                           end
@@ -364,6 +364,8 @@ implementation
                                 else
                                   eq:=te_convert_l2;
                               end
+                            else if is_widestring(def_to) then
+                              eq:=te_convert_l3
                             else
                               eq:=te_convert_l2;
                           end;
@@ -378,7 +380,9 @@ implementation
                          else
                            { size of widechar array is double due the sizeof a widechar }
                            if not(is_shortstring(def_to) and (def_from.size>255*sizeof(widechar))) then
-                             eq:=te_convert_l3;
+                             eq:=te_convert_l3
+                         else
+                           eq:=te_convert_l2;
                        end;
                    end;
                  pointerdef :

+ 9 - 0
tests/webtbs/tw4336.pp

@@ -0,0 +1,9 @@
+uses SysUtils;
+
+var A : array [1..10] of Char;
+
+begin
+
+writeln (Trim (A));
+
+end.