src/test/04-Stress/func-call-8-class-s.ck
raw| 1 | // #2024-func-call-update verification |
| 2 | |
| 3 | 0 => int N; |
| 4 | |
| 5 | // test calling member function from within class definition |
| 6 | class Foo |
| 7 | { |
| 8 | fun static void foo() { N++; bar(); } |
| 9 | fun static void bar() { if( N >= 100000 ) <<< "success" >>>; } |
| 10 | } |
| 11 | |
| 12 | // test for stack overflow |
| 13 | repeat(100000) Foo.foo(); |