Debian Codegraph @

src/test/04-Stress/func-call-7-class-m.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 void foo() { N++; bar(); }
9 fun void bar() { if( N >= 100000 ) <<< "success" >>>; }
10 }
11
12 // test for stack overflow
13 repeat(100000) { Foo foo; foo.foo(); }