From cf4a2bd392ad0b5462ded28063500bf9e40c3786 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sun, 19 Aug 2012 13:57:48 +0000 Subject: [PATCH] * fixed java.lang.String and Pascal string comparisons after operator overloading rewrite (consider java_jlstring to be "stringlike") git-svn-id: trunk@22127 - --- compiler/defutil.pas | 3 ++- compiler/htypechk.pas | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/compiler/defutil.pas b/compiler/defutil.pas index 7159972de4..8ddc80a9d3 100644 --- a/compiler/defutil.pas +++ b/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; diff --git a/compiler/htypechk.pas b/compiler/htypechk.pas index f4aedf7e75..cf1a4d4c2c 100644 --- a/compiler/htypechk.pas +++ b/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)