| 1 | // Copyright © SixtyFPS GmbH <info@slint.dev> |
| 2 | // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 |
| 3 | |
| 4 | export Hello := Rectangle { |
| 5 | |
| 6 | property <int> aa: 45; |
| 7 | property <{o:[int], c:string}> bb; |
| 8 | property <int> xx: aa[2]; |
| 9 | // ^error{int is not an indexable type} |
| 10 | property <int> yy: dontexist[2]; |
| 11 | // ^error{Unknown unqualified identifier 'dontexist'} |
| 12 | //property <int> zz: bb.o[2].aa; |
| 13 | property <int> ww: bb.c[2]; |
| 14 | // ^error{string is not an indexable type} |
| 15 | |
| 16 | property <int> uu: bb.o[bb.c]; |
| 17 | // ^error{Cannot convert string to int} |
| 18 | |
| 19 | |
| 20 | |
| 21 | } |
| 22 | |