src/test/01-Basic/129.ck
raw| 1 | // this tests assignment into arrays |
| 2 | // june 2023 |
| 3 | |
| 4 | // error: [1.0, 1.0] @=> float foo[2]; |
| 5 | // this is ok: |
| 6 | [1, 5] @=> int foo[]; |
| 7 | |
| 8 | // error: [ new Object ] @=> Object @ bar[1]; |
| 9 | // this is ok: |
| 10 | [ new Object ] @=> Object @ bar[]; |
| 11 | |
| 12 | if( foo[1] == 5 && bar[0] != null ) <<< "success" >>>; |