/* LICENSE BEGIN This file is part of the SixtyFPS Project -- https://sixtyfps.io Copyright (c) 2021 Olivier Goffart Copyright (c) 2021 Simon Hausmann SPDX-License-Identifier: GPL-3.0-only This file is also available under commercial licensing terms. Please contact info@sixtyfps.io for more information. LICENSE END */ SuperSimple := Rectangle { background: area.pressed ? green : blue; property c2: area.pressed ? 123 : 456; // ^error{Cannot convert float to color} property c3: area.pressed ? 123 : #456; // ^error{Cannot convert color to float} // ^^error{Cannot convert void to int} property c4: area.pressed ? 123ms : 123; // ^error{Cannot convert float to duration} // ^^error{Cannot convert void to int} property c5: true ? 123px : 0; property c6: area.pressed ? 123ms : 123; // ^error{Cannot convert float to duration} // ^^error{Cannot convert void to duration} area := TouchArea { } } Test2 := Rectangle { background: { // ^error{Cannot convert void to brush} if (true) { } else { blue; } } x: { if (false) {0}; } // ^error{Cannot convert void to length} y: { if (false) {0px} else { return 5px; }; } property something: { if (true) {"hello"} else { return 5px; }; } // ^error{Cannot convert string to length} }