Debian Codegraph @

src/test/01-Basic/164-depend-class-after.ck

raw
1 // separate dependency tracking for context-top-level vars and class-top-level vars
2
3 // class definition
4 class Foo
5 {
6 // the dependency
7 5 => int myVal;
8
9 // ok since after myVal initialize
10 go() + 2 => myVal;
11
12 fun int go()
13 {
14 return myVal;
15 }
16 }
17
18 // should work before or after the class def
19 Foo foo;
20 // should work before or after the class def
21 if( foo.go() == 7 ) <<< "success" >>>;
22