Consider the following code:
class Cat(var sleeping: Boolean)
fun Cat.wakeUp() {
this.sleeping = false
}
fun Cat.wakeUp() {
this.sleeping = true
}
fun main() {
val cat = Cat(false)
cat.wakeUp()
println(cat.sleeping)
}
The code ...