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