瀏覽代碼

+ classrefdef is assignment compatible to pointers in delphi mode

git-svn-id: trunk@7648 -
florian 18 年之前
父節點
當前提交
c7037df254
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      compiler/defcmp.pas

+ 8 - 0
compiler/defcmp.pas

@@ -1252,6 +1252,14 @@ implementation
                     end;
                  end
                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 }
                 if (fromtreetype=niln) then
                  begin