瀏覽代碼

* make compatible_childmethod_resultdef() also work for Java classes
(so that you can override a method in a child class with one that
returns a descendent of the original return type -- since the JVM
will always select the version with the most specific return type,
that even corresponds perfectly to standard JVM behaviour)

git-svn-id: branches/jvmbackend@18706 -

Jonas Maebe 14 年之前
父節點
當前提交
f20e206849
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      compiler/defcmp.pas

+ 2 - 2
compiler/defcmp.pas

@@ -1908,8 +1908,8 @@ implementation
           (equal_defs(parentretdef,childretdef)) or
           ((parentretdef.typ=objectdef) and
            (childretdef.typ=objectdef) and
-           is_class_or_interface_or_objc(parentretdef) and
-           is_class_or_interface_or_objc(childretdef) and
+           is_class_or_interface_or_objc_or_java(parentretdef) and
+           is_class_or_interface_or_objc_or_java(childretdef) and
            (tobjectdef(childretdef).is_related(tobjectdef(parentretdef))))
       end;