mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-03 07:04:34 +00:00

That way the error for an expression is at a better location, and this also prevent the formater that removes space in expressions to remove the spaces before the expression that shouldn't be removed
26 lines
1.1 KiB
Text
26 lines
1.1 KiB
Text
// Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
|
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
|
|
|
export X := Rectangle {
|
|
|
|
property infer_loop <=> infer_loop2;
|
|
// ^error{Could not infer type of property 'infer-loop'}
|
|
property infer_loop2 <=> infer_loop3;
|
|
// ^error{Could not infer type of property 'infer-loop2'}
|
|
property infer_loop3 <=> infer_loop;
|
|
// ^error{Could not infer type of property 'infer-loop3'}
|
|
// ^^error{Unknown unqualified identifier 'infer_loop'}
|
|
|
|
property infer_error <=> r.infer_error;
|
|
// ^error{Could not infer type of property 'infer-error'}
|
|
r := Rectangle {
|
|
property infer_error <=> 0;
|
|
// ^error{The expression in a two way binding must be a property reference}
|
|
// ^^error{Could not infer type of property 'infer-error'}
|
|
}
|
|
|
|
property auto_background <=> background;
|
|
property <string> alias_to_background <=> auto_background;
|
|
// ^error{The property does not have the same type as the bound property}
|
|
|
|
}
|