You have understood the idea of type aliases clearly, but your colleague has not. Correct the mistakes he (or she) made!
Type aliases
Don't be afraid of snakes and correct mistakes
Report a typo
Write a program in Kotlin
// correct the code line below
type alias Pet.Reptile.Snake = Snake
// don't change the code below!
class Pet {
class Reptile {
data class Snake(val str: String) {
val sound = str
}
}
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.