slint/sixtyfps_compiler/tests/syntax/basic/property_declaration.60
2020-08-03 16:15:41 +02:00

15 lines
467 B
Text

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