this works, is it the correct way to do it? ```int...
# announcements
p
this works, is it the correct way to do it?
Copy code
interface Animal<T : Animal<T>> {
    val id: String
    fun withSound(sound: String): T
}

data class Dog(
    override val id: String
) : Animal<Dog> {
    // does not work
    override fun withSound(sound: String): Dog {
        TODO("Not yet implemented")
    }
}
🧵 3