fpc/tests/test/jvm/tjsetter.java
Jonas Maebe 1ce93f7430 * when automatically generating an overriding getter/setter method (because
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 -
2013-08-06 21:50:56 +00:00

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);
}
}