mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-03 04:28:26 +01:00
of the jdk15 unit in that case)
* adjusted testall.sh script so it can also be used to test class
files compiled for Android (still with the JVM though)
git-svn-id: branches/jvmbackend@19835 -
66 lines
1011 B
ObjectPascal
66 lines
1011 B
ObjectPascal
program tnestproc;
|
|
|
|
{$mode delphi}
|
|
|
|
uses
|
|
{$ifdef java}jdk15{$else}androidr14{$endif};
|
|
|
|
procedure outer(var para: byte);
|
|
const xxx: longint = 5;
|
|
var
|
|
a: longint;
|
|
called: boolean;
|
|
|
|
procedure inner;
|
|
begin
|
|
if not called then
|
|
begin
|
|
called:=true;
|
|
inner;
|
|
exit;
|
|
end;
|
|
if a<>1 then
|
|
raise JLException.Create('a1');
|
|
if para<>2 then
|
|
raise JLException.Create('para1');
|
|
a:=2;
|
|
para:=3;
|
|
end;
|
|
|
|
|
|
procedure inner2;
|
|
var
|
|
b: longint;
|
|
|
|
procedure doubleinner;
|
|
begin
|
|
b:=3;
|
|
end;
|
|
|
|
begin
|
|
doubleinner;
|
|
if b<>3 then
|
|
raise JLException.Create('b');
|
|
inner;
|
|
end;
|
|
|
|
begin
|
|
a:=1;
|
|
called:=false;
|
|
inner;
|
|
if a<>2 then
|
|
raise JLException.Create('a2');
|
|
if para<>3 then
|
|
raise JLException.Create('para2');
|
|
end;
|
|
|
|
var
|
|
x: record end;
|
|
y: byte;
|
|
begin
|
|
y:=2;
|
|
outer(y);
|
|
if y<>3 then
|
|
raise JLException.Create('para3');
|
|
end.
|