Hi, I'm having trouble creating a map whose keys are a constructor (the class) and values are an instance of said class. Aditionally I also want to require the keys to implement a specific instance.
This is what I tried: (playground link) but it doesn't correctly error if the set value isn't an instance of the key, and when getting it doesn't return an instance of the key, but rather an instance of the interface. I'm not sure what I'm doing wrong here.