Debian Codegraph @

src/test/01-Basic/189-class-var-anywhere2.ck

raw
1 // verifying accessing member declared below where it's used
2 // from inside a class def
3
4 // class def
5 class Foo
6 {
7 Bar bar;
8
9 fun void go()
10 {
11 // try to access bar.val, below
12 <<< bar.val >>>;
13 }
14 }
15
16 // another class
17 class Bar
18 {
19 int val;
20 }
21
22 // success if no errors
23 <<< "success" >>>;