use read_only::embed;

mod m {
    use super::embed;

    #[embed]
    pub struct Demo {
        #[readonly]
        pub explicit: i32,
        #[readonly]
        inherited: i32,
        pub mutable: i32,
    }

    impl Demo {
        pub fn new(explicit: i32, inherited: i32, mutable: i32) -> Self {
            Self {
                read_only: ReadOnlyDemo {
                    explicit,
                    inherited,
                },
                mutable,
            }
        }
    }
}

fn main() {
    let mut demo = m::Demo::new(1, 2, 3);
    let _ = demo.explicit;
    let _ = demo.inherited;
    demo.mutable = 4;
    let _ = demo.mutable;
}
