src/test/06-Errors/error-depend-new.ck
raw| 1 | // class Foo needs 'array', cannot instantiate Foo before 'array' initializes |
| 2 | // 'new' edition of unit test; ALSO SEE: error-depend-class.ck |
| 3 | |
| 4 | // does not work heress |
| 5 | new Foo @=> Foo @ foo; |
| 6 | |
| 7 | // declaration and initialization |
| 8 | [1, 2, 3] @=> int array[]; |
| 9 | |
| 10 | // class defintion |
| 11 | class Foo |
| 12 | { |
| 13 | // need array to initialized |
| 14 | <<< array[0], array[1], array[2] >>>; |
| 15 | } |