mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-20 15:22:13 +00:00

After commit ef2e6491cd
we end up processing Paths multiple times, and thus we might end up attempting to replace an elements binding. Don't do that if no new elements are declared, but yield an error if attempting to do so. We could support this in the future (appending), but for now it's better to produce an error.
Fixes #9170
20 lines
476 B
Text
20 lines
476 B
Text
// Copyright © SixtyFPS GmbH <info@slint.dev>
|
|
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
|
|
|
|
component Arc inherits Path {
|
|
MoveTo {
|
|
x: 0;
|
|
y: 0;
|
|
}
|
|
}
|
|
|
|
export component Foo inherits Rectangle {
|
|
Arc { } // OK!
|
|
Arc {
|
|
// ^error{The Path was already populated in the base type and it can't be re-populated again}
|
|
LineTo {
|
|
x: 1;
|
|
y: 1;
|
|
}
|
|
}
|
|
}
|