Debian Codegraph @

src/test/05-Global/28.ck

raw
1 // 28.ck : global variable
2
3 10 => global int z;
4
5 class X
6 {
7 fun void foo()
8 {
9 20 => z;
10 }
11 }
12
13 // instantiate a X
14 X x;
15
16 // call
17 x.foo();
18
19 // test
20 if( z == 20 ) <<<"success">>>;