slint/sixtyfps_compiler/tests/syntax/basic/self_assign.60
Olivier Goffart 232848de9e Make sure that there is only one error reported when assigning to invalid
This also start parsing assignment ('=') as a self assignement
but the code generation is not yet implmented
2020-07-24 11:33:00 +02:00

23 lines
542 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}
}
TouchArea {
clicked => { doesnotexist += 24; }
// ^error{Unknown unqualified identifier 'doesnotexist'}
}
}