New syntax: allow to create component without base

This commit is contained in:
Olivier Goffart 2022-10-26 16:26:55 +02:00 committed by Olivier Goffart
parent d7e366864b
commit f055afd2de
14 changed files with 187 additions and 77 deletions

View file

@ -0,0 +1,18 @@
// Copyright © SixtyFPS GmbH <info@slint-ui.com>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
component Foo {
background: 0;
// ^error{Unknown property background$}
width: 12px;
}
component Bar {
Foo { }
Foo {
background: 0;
// ^error{Unknown property background in Foo}
height: self.width;
}
}