소스 검색

* also mark all non-virtual methods as "final" (since regular methods
don't exist in Java)

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

Jonas Maebe 14 년 전
부모
커밋
a6a60e3e26
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      compiler/agjasmin.pas

+ 3 - 1
compiler/agjasmin.pas

@@ -691,7 +691,9 @@ implementation
         if is_javainterface(tdef(pd.owner.defowner)) then
           result:=result+'abstract ';
         if (pd.procsym.owner.symtabletype in [globalsymtable,staticsymtable,localsymtable]) or
-           (po_finalmethod in pd.procoptions) then
+           (po_finalmethod in pd.procoptions) or
+           (not(po_virtualmethod in pd.procoptions) and
+            not(pd.proctypeoption in [potype_constructor,potype_class_constructor])) then
           result:=result+'final ';
         result:=result+pd.jvmmangledbasename;
       end;