slint/sixtyfps_compiler/tests/syntax/lookup/deprecated_property.60
Olivier Goffart c25538c982 Normalize identifiers to - instead of _
As a result
 - The error messages will now show the error with `-` instead of `_`
 - The LSP will auto-complete with -
 - The interpreter's list of properties will list the property with '-'
   (but we made the change so that set_property, get_property, and so on
   work also if passed a '-')
2021-08-10 22:21:01 +02:00

33 lines
1.3 KiB
Text

/* LICENSE BEGIN
This file is part of the SixtyFPS Project -- https://sixtyfps.io
Copyright (c) 2021 Olivier Goffart <olivier.goffart@sixtyfps.io>
Copyright (c) 2021 Simon Hausmann <simon.hausmann@sixtyfps.io>
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 */
Xxx := Rectangle {
color: white;
// ^warning{The property 'color' has been deprecated. Please use 'background' instead}
r := Rectangle {
background: root.color;
// ^warning{The property 'color' has been deprecated. Please use 'background' instead}
animate color {
// ^warning{The property 'color' has been deprecated. Please use 'background' instead}
duration: 250ms;
}
}
minimum-height: root.maximum-width;
// ^warning{The property 'minimum-height' has been deprecated. Please use 'min-height' instead}
// ^^warning{The property 'maximum-width' has been deprecated. Please use 'max-width' instead}
callback not_called;
not_called() => {
color = #000000;
// ^warning{The property 'color' has been deprecated. Please use 'background' instead}
}
}