use abstraps::core::*; use abstraps::*; #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug)] struct Foo3; interfaces!(Foo3: dyn ObjectClone, dyn std::fmt::Debug, dyn Bar2); trait Bar2 { fn do_something(&self) -> Option; } impl Bar2 for Foo3 { fn do_something(&self) -> Option { println!("I'm a Foo3!"); None } } trait SomeOther { fn do_other(&self); } impl SomeOther for Foo3 { fn do_other(&self) {} } #[test] fn test_dynamic_bad() { dynamic_interfaces! { Foo3: dyn SomeOther; } let obj = Box::new(Foo3) as Box; let r: Option<&dyn SomeOther> = obj.query_ref(); r.unwrap().do_other(); }