mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 03:48:07 +02:00
* 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:
parent
d49b4043ab
commit
8f96ace589
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
@ -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
|
||||
|
@ -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%
|
||||
|
@ -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
29
tests/test/jvm/tprop4.pp
Normal 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.
|
Loading…
Reference in New Issue
Block a user