* fixed -CTauto(g|s)etterprefix automatically generated helpers in case they

have to wrap an existing (g|s)etter that was marked as "abstract" (don't
    mark the helper also as abstract, sicnce it contains code)

git-svn-id: trunk@23545 -
This commit is contained in:
Jonas Maebe 2013-01-30 22:35:59 +00:00
parent d49b4043ab
commit 8f96ace589
5 changed files with 37 additions and 0 deletions

1
.gitattributes vendored
View File

@ -10409,6 +10409,7 @@ tests/test/jvm/topovl.pp svneol=native#text/plain
tests/test/jvm/tprop.pp svneol=native#text/plain
tests/test/jvm/tprop2.pp svneol=native#text/plain
tests/test/jvm/tprop3.pp svneol=native#text/plain
tests/test/jvm/tprop4.pp svneol=native#text/plain
tests/test/jvm/tpvar.pp svneol=native#text/plain
tests/test/jvm/tpvardelphi.pp svneol=native#text/plain
tests/test/jvm/tpvarglobal.pp svneol=native#text/plain

View File

@ -993,6 +993,7 @@ implementation
{ getter/setter could have parameters in case of indexed access
-> copy original procdef }
pd:=tprocdef(orgaccesspd.getcopy);
exclude(pd.procoptions,po_abstractmethod);
{ can only construct the artificial name now, because it requires
pd.defid }
if not explicitwrapper then

View File

@ -254,3 +254,7 @@ java -Dfile.encoding=UTF-8 -cp ..\..\..\rtl\units\jvm-java;. -Sa ttincdec
if %errorlevel% neq 0 exit /b %errorlevel%
ppcjvm -O2 -g -B -CTautogetterprefix=Get tprop3.pp
if %errorlevel% neq 0 exit /b %errorlevel%
ppcjvm -O2 -g -B -CTautogetterprefix=Get tprop4.pp
if %errorlevel% neq 0 exit /b %errorlevel%
java -Dfile.encoding=UTF-8 -cp ..\..\..\rtl\units\jvm-java;. -Sa tprop4
if %errorlevel% neq 0 exit /b %errorlevel%

View File

@ -142,4 +142,6 @@ java -Dfile.encoding=UTF-8 -cp ../../../rtl/units/$RTLDIR:. tw22807
$PPC -O2 -g -B -Sa ttincdec.pp
java -Dfile.encoding=UTF-8 -cp ../../../rtl/units/$RTLDIR:. ttincdec
$PPC -O2 -g -B -CTautogetterprefix=Get tprop3
$PPC -O2 -g -B -CTautogetterprefix=Get tprop4
java -Dfile.encoding=UTF-8 -cp ../../../rtl/units/$RTLDIR:. tprop4

29
tests/test/jvm/tprop4.pp Normal file
View File

@ -0,0 +1,29 @@
program tprop4;
{$mode delphi}
type
tprop4c = class
protected
function Gettest2: longint; virtual; abstract;
public
property test: longint read Gettest2;
end;
tprop4c2 = class(tprop4c)
protected
function Gettest2: longint; override;
end;
function tprop4c2.Gettest2: longint;
begin
result:=1;
end;
var
c: tprop4c;
begin
c:=tprop4c2.create;
if c.test<>1 then
halt(1);
end.