slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
17.67k stars 611 forks source link

Fix wrong value or panic in the interpreter when converting struct of… #6722

Closed ogoffart closed 2 weeks ago

ogoffart commented 2 weeks ago

… struct

The "tmpobj" variable was overwriten because the interpreter (contrary to rust and C++) don't have scopes for the local variables, and local variable of the same name would conflict. (I think this could in theory be a problem in C++ and rust although i haven't reproduced it)

Other uses of StoreLocalVariable also make the number unique with a counter

Fixes #6721