// fixes https://github.com/vlang/v/issues/1081 and https://github.com/vlang/v/issues/7338, code by https://github.com/nedpals
//   copied from https://github.com/vlang/v/issues/7338 
struct Doggo {
pub mut:
	name string
}

fn (mut d Doggo) set_name(name string) {
	d.name = name
}

interface Animal {
	set_name(name string)
}

fn set_animal_name(a Animal, name string) {
	a.set_name(name)
}

fn main() {
	dog := Doggo{'Doggo'}
	println(dog.name)
	set_animal_name(dog, 'Pupper')
	println(dog.name)
}
