slint/sixtyfps_compiler/tests/basic/property_declaration.60

12 lines
382 B
Text

Test := Rectangle {
property<int32> foo;
foo: 100;
property<NonExistent> bar;
// ^error{Unknown property type 'NonExistent'}
property<float32> foo;
// ^error{Cannot override property 'foo'}
property<string> text: "property with binding initializer";
property<int32> x;
// ^error{Cannot override property 'x'}
}