Debian Codegraph @

src/test/01-Basic/167-depend-ref.ck

raw
1 // although class Foo needs 'array', declaring a null reference to Foo should be okay
2 // ALSO SEE: 06-Errors/error-depend-class.ck
3
4 // no actual instance
5 Foo @ foo;
6
7 // the variable and initialization
8 [1, 2, 3] @=> int array[];
9
10 // class definition
11 class Foo
12 {
13 // need 'array'
14 <<< array[0], array[1], array[2] >>>;
15 }
16
17 // no errors then good
18 <<< "success" >>>;