Browse Source

+ classrefdef is assignment compatible to pointers in delphi mode

git-svn-id: trunk@7648 -
florian 18 years ago
parent
commit
c7037df254
1 changed files with 8 additions and 0 deletions
  1. 8 0
      compiler/defcmp.pas

+ 8 - 0
compiler/defcmp.pas

@@ -1252,6 +1252,14 @@ implementation
                     end;
                     end;
                  end
                  end
                else
                else
+                 if (m_delphi in current_settings.modeswitches) and
+                    is_voidpointer(def_from) then
+                  begin
+                    doconv:=tc_equal;
+                    { prefer pointer-pointer assignments }
+                    eq:=te_convert_l2;
+                  end
+                 else
                 { nil is compatible with class references }
                 { nil is compatible with class references }
                 if (fromtreetype=niln) then
                 if (fromtreetype=niln) then
                  begin
                  begin