mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 17:09:41 +02:00
* support anonymous procvar definitions for jvm outside parameter lists (in a
parameter list they represent nested procvars, which aren't supported yet) git-svn-id: trunk@32454 -
This commit is contained in:
parent
318b69600c
commit
c4b347c271
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -11566,6 +11566,7 @@ tests/test/jvm/tnestproc.pp svneol=native#text/plain
|
||||
tests/test/jvm/topovl.pp svneol=native#text/plain
|
||||
tests/test/jvm/toverload.pp svneol=native#text/plain
|
||||
tests/test/jvm/toverload2.pp svneol=native#text/plain
|
||||
tests/test/jvm/tprocvaranon.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
|
||||
|
@ -475,7 +475,10 @@ implementation
|
||||
FpcBaseNestedProcVarType, pass nestedfpstruct to constructor and
|
||||
copy it }
|
||||
if name='' then
|
||||
internalerror(2011071901);
|
||||
begin
|
||||
if is_nested_pd(tabstractprocdef(def)) then
|
||||
internalerror(2011071901);
|
||||
end;
|
||||
|
||||
setup_for_new_class('jvm_pvar_class',sstate,islocal,oldsymtablestack);
|
||||
|
||||
|
@ -320,3 +320,7 @@ ppcjvm -O2 -g -B -CTinitlocals tformalclass
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
java -Dfile.encoding=UTF-8 -cp ..\..\..\rtl\units\jvm-java;. tformalclass
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
ppcjvm -O2 -g -B -CTinitlocals tprocvaranon
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
java -Dfile.encoding=UTF-8 -cp ..\..\..\rtl\units\jvm-java;. tprocvaranon
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
@ -187,3 +187,5 @@ java -Dfile.encoding=UTF-8 -cp ../../../rtl/units/$RTLDIR:. tsetstring
|
||||
$PPC -O2 -g -B -Sa tnestcallpass1
|
||||
$PPC -O2 -g -B -Sa tformalclass
|
||||
java -Dfile.encoding=UTF-8 -cp ../../../rtl/units/$RTLDIR:. tformalclass
|
||||
$PPC -O2 -g -B -Sa tprocvaranon
|
||||
java -Dfile.encoding=UTF-8 -cp ../../../rtl/units/$RTLDIR:. tprocvaranon
|
||||
|
20
tests/test/jvm/tprocvaranon.pp
Normal file
20
tests/test/jvm/tprocvaranon.pp
Normal file
@ -0,0 +1,20 @@
|
||||
program tprocvaranon;
|
||||
|
||||
type
|
||||
tprocvaranonrec = record
|
||||
p: function: longint;
|
||||
end;
|
||||
|
||||
function test: longint;
|
||||
begin
|
||||
test:=123;
|
||||
end;
|
||||
|
||||
var
|
||||
r: tprocvaranonrec;
|
||||
begin
|
||||
r.p:=@test;
|
||||
if r.p()<>123 then
|
||||
halt(1);
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user