Browse Source

* fixed java.lang.String and Pascal string comparisons after operator
overloading rewrite (consider java_jlstring to be "stringlike")

git-svn-id: trunk@22127 -

Jonas Maebe 13 năm trước cách đây
mục cha
commit
cf4a2bd392
2 tập tin đã thay đổi với 5 bổ sung2 xóa
  1. 2 1
      compiler/defutil.pas
  2. 3 1
      compiler/htypechk.pas

+ 2 - 1
compiler/defutil.pas

@@ -424,7 +424,8 @@ implementation
                   is_chararray(def) or
                   is_widechararray(def) or
                   is_open_chararray(def) or
-                  is_open_widechararray(def);
+                  is_open_widechararray(def) or
+                  (def=java_jlstring);
       end;
 
     function is_enum(def : tdef) : boolean;

+ 3 - 1
compiler/htypechk.pas

@@ -477,7 +477,9 @@ implementation
                              (
                                is_implicit_pointer_object_type(rd) or
                                (rd.typ=pointerdef) or
-                               (rt=niln)
+                               (rt=niln) or
+                               ((ld=java_jlstring) and
+                                is_stringlike(rd))
                              )
                            ) and
                            (treetyp in identity_operators)