Browse Source

* two function references are equal to each other as long as their signatures match

Sven/Sarah Barth 3 years ago
parent
commit
9b9ae2db1a
1 changed files with 8 additions and 0 deletions
  1. 8 0
      compiler/defcmp.pas

+ 8 - 0
compiler/defcmp.pas

@@ -1867,6 +1867,14 @@ implementation
                    doconv:=tc_char_2_string;
                    eq:=te_convert_l2
                  end
+               else if is_funcref(def_to) and
+                   is_funcref(def_from) and
+                   not (cdo_equal_check in cdoptions) then
+                 begin
+                   eq:=funcref_equal(tobjectdef(def_from),tobjectdef(def_to));
+                   if eq>=te_equal then
+                     doconv:=tc_equal;
+                 end
                else
                { specific to implicit pointer object types }
                 if is_implicit_pointer_object_type(def_to) then