slint::include_modules!();
fn main {
let main = Main1::new().expect("Create UI");
let main = Main2::new().expect("Create UI");
}
I get error:
--> src/main.rs:14:16
|
14 | let main = Main2::new().expect("Create UI");
| ^^^^^
| |
| use of undeclared type `Main2`
| help: a struct with a similar name exists: `Main1`
Then If I change order to have Main1 as first component, then error will be reversed.
So it seems inline export of component actually gets overshadowed by builder as I checked generated code and there is no declaration of second component
I'm not sure if it is intended behavior, but it seems to be quite error prone and probably should be clarified (error out if second export overshadows another export)
Then given the following code:
I get error:
Then If I change order to have Main1 as first component, then error will be reversed. So it seems inline export of component actually gets overshadowed by builder as I checked generated code and there is no declaration of second component
I'm not sure if it is intended behavior, but it seems to be quite error prone and probably should be clarified (error out if second export overshadows another export)