I'm pulling my hair out over here.
I'm just trying to produce a struct that has a member variable that can accept any shape, such as Circle(), Rectangle(), RoundedRectangle(), etc.
of course, the compiler is very mad about this, so I tried to write a function that takes an enum and returns 'some Shape' but that doesn't work because of opaque return types...
I'm thinking I need to build an 'AnyShape' using type erasure but it's super confusing to me. Does anyone know how to do this?
Looking for any helps / pointers you guys have. I've wasted hours on this.