src/test/01-Basic/166-depend-func.ck
raw| 1 | // dependency tracking for context-top-level variable |
| 2 | // ALSO SEE: 06-Errors/error-depend-func.ck |
| 3 | |
| 4 | // no work here (it would skip 'array' initialization) |
| 5 | // printArray(); |
| 6 | |
| 7 | [1, 2, 3] @=> int array[]; |
| 8 | |
| 9 | // works here |
| 10 | printArray(); |
| 11 | |
| 12 | // function that needs array |
| 13 | fun void printArray() |
| 14 | { |
| 15 | <<< array[0], array[1], array[2] >>>; |
| 16 | } |