mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 16:19:28 +02: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 -
31 lines
399 B
ObjectPascal
31 lines
399 B
ObjectPascal
program classlist;
|
|
|
|
{$mode delphi}
|
|
|
|
uses
|
|
{$ifdef java}jdk15{$else}androidr14{$endif};
|
|
|
|
type
|
|
T1 = class
|
|
end;
|
|
|
|
CT1 = class of T1;
|
|
|
|
function test : string;
|
|
var
|
|
T : T1;
|
|
C : CT1;
|
|
L : JUArrayList;
|
|
begin
|
|
T := T1.Create;
|
|
C := CT1(JLObject(T).getClass);
|
|
L := JUArrayList.Create;
|
|
L.add(JLObject(C)); // ???
|
|
if ct1(l.get(0))<>t1 then
|
|
raise JLException.create('error');
|
|
end;
|
|
|
|
begin
|
|
test;
|
|
end.
|