Converting between user-defined types: downcasting