mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-02 04:48:27 +00:00
Fix property wrongly considered as const if it is modified through an alias
Fixes #4241
This commit is contained in:
parent
a4f2b45d9a
commit
96324a8300
2 changed files with 69 additions and 6 deletions
|
|
@ -83,13 +83,14 @@ impl NamedReference {
|
|||
return false;
|
||||
}
|
||||
|
||||
if check_binding {
|
||||
if let Some(b) = e.bindings.get(self.name()) {
|
||||
if !b.borrow().analysis.as_ref().map_or(false, |a| a.is_const) {
|
||||
return false;
|
||||
}
|
||||
check_binding = false;
|
||||
if let Some(b) = e.bindings.get(self.name()) {
|
||||
if check_binding && !b.borrow().analysis.as_ref().map_or(false, |a| a.is_const) {
|
||||
return false;
|
||||
}
|
||||
if !b.borrow().two_way_bindings.iter().all(|n| n.is_constant()) {
|
||||
return false;
|
||||
}
|
||||
check_binding = false;
|
||||
}
|
||||
if let Some(decl) = e.property_declarations.get(self.name()) {
|
||||
if let Some(alias) = &decl.is_alias {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue