mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Fix error message when a property named color is override
It said `Cannot override property 'background'` because color is defined as below ```slint property <color> color <=> background; ``` For the warning, the name should not be resolved. Fixes #6324
This commit is contained in:
parent
831211e955
commit
7a8ca9b147
2 changed files with 4 additions and 1 deletions
|
@ -1013,7 +1013,7 @@ impl Element {
|
|||
Type::Invalid => {} // Ok to proceed with a new declaration
|
||||
_ => {
|
||||
diag.push_error(
|
||||
format!("Cannot override property '{}'", prop_name),
|
||||
format!("Cannot override property '{}'", unresolved_prop_name),
|
||||
&prop_decl
|
||||
.DeclaredIdentifier()
|
||||
.child_token(SyntaxKind::Identifier)
|
||||
|
|
|
@ -25,4 +25,7 @@ export Test := Comp {
|
|||
|
||||
property<bool> pressed;
|
||||
// ^error{Cannot declare property 'pressed' when a callback with the same name exists}
|
||||
|
||||
property<color> color;
|
||||
// ^error{Cannot override property 'color'}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue