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:
Tasuku Suzuki 2024-12-24 19:41:27 +09:00 committed by Olivier Goffart
parent 831211e955
commit 7a8ca9b147
2 changed files with 4 additions and 1 deletions

View file

@ -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)