Compiler: Don't panic when a Row is repeated in a GridLayout

Fixes #3729
This commit is contained in:
Olivier Goffart 2023-10-23 15:53:24 +02:00 committed by Olivier Goffart
parent 49571c8bf2
commit ae4debafe2
2 changed files with 28 additions and 1 deletions

View file

@ -0,0 +1,14 @@
// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial
export component Test {
property <bool> condition;
GridLayout {
// Issue #3729
if (condition) : r := Row {
// ^error{'if' or 'for' expressions are not currently supported in grid layouts}
Rectangle {}
}
}
}