mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 03:47:59 +02:00

a property in a child class has a higher visibility than the getter/ setter), ensure that we call the inherited method and not the method itself (causing a stack overflow due to infinite recursion) git-svn-id: trunk@25223 -
20 lines
343 B
Java
20 lines
343 B
Java
import org.freepascal.test.jsetter.*;
|
|
|
|
public class tjsetter {
|
|
|
|
public static void main(String[] args)
|
|
{
|
|
tjsetterchild c;
|
|
|
|
c = new tjsetterchild();
|
|
c.SetVal(2);
|
|
if (c.get() != 2)
|
|
java.lang.Runtime.getRuntime().exit(1);
|
|
c = new tjsetterchild2();
|
|
c.SetVal(2);
|
|
if (c.get() != 1)
|
|
java.lang.Runtime.getRuntime().exit(2);
|
|
}
|
|
|
|
}
|