slint/sixtyfps_compiler/tests/basic/self_assign.60
2020-07-14 17:45:03 +02:00

17 lines
400 B
Text

SuperSimple := Rectangle {
TouchArea {
clicked => { root.x += 1px; }
}
TouchArea {
clicked => { x += 1px; }
}
TouchArea {
clicked => { 12 += 1; }
// ^error{Self assignement need to be done on a property}
}
TouchArea {
clicked => { x += "string"; }
// ^error{Cannot convert string to length}
}
}