slint/sixtyfps_compiler/tests/syntax/basic/path_for.60
Simon Hausmann 89df782463 Don't panic in the compiler when encountering a Path element with for-in
Instead, produce a diagnostic message.

cc #754
2022-01-06 12:53:46 +01:00

18 lines
509 B
Text

// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
TestCase := Rectangle {
Path {
MoveTo {
x: 0;
y: 0;
}
for sample[i] in [ 0, 1, 2, 3 ] : LineTo {
// ^error{Path elements are not supported with `for`-`in` syntax, yet \(https://github.com/sixtyfpsui/sixtyfps/issues/754\)}
x: i;
y: sample;
}
Close {}
}
}