xun su
12/16/2022, 8:34 AMVariable 'xxx' must be initialized
? look the code below:
class CompanyResource {
companion object {
val allNames: Map<String, String> =
mapOf(
someone.first to someone.second // error: Variable 'someone' must be initialized
)
val someone =
Pair<String, String>(
"peter" , "blunt"
)
}
}
Luke Armitage
12/16/2022, 8:35 AMsomeone
above allNames
Sam
12/16/2022, 8:35 AMxun su
12/16/2022, 8:37 AM