Cast Anonymous (Any) object to class object in kotlin

后端 未结 0 541
忘了有多久
忘了有多久 2021-01-03 14:38

Kotlin compiler is giving me error while running below :

fun main() {
    val x = object {
        val i = 1
        val k = "s"
    }
    val y = x         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题