pub class Animal { pub name String; constructor() { self.name = "Rex".to_string(); } pub fn speak(*self) { println!("Unknown"); } pub fn test_speak(*self) { self.speak(); } } pub class Dog : Animal { constructor() { unsafe { std::ptr::write(&mut super, Super::new()); } } pub override fn speak(*self) { println!("Woof!"); } } pub fn run_tests() { let dawg = Dog::new(); dawg.test_speak(); }