https://kotlinlang.org logo
e

elizarov

12/30/2016, 5:18 PM
Some designs cannot be made type-safe at all. Using an unsafe cast in this case is a correct work-around. But you should not rely on raw types in your design. This is bad-style and is explicitly forbidden in Kotlin for this very reason.
👍 3