igor.wojda
01/06/2021, 11:44 AMval
, not var
with nullable type and no custom getter). Do you think we need IDE warning here?
private val requestId: String? = null
Dmitry
01/06/2021, 11:48 AMclass Job(
private val requestId: String? = null
)
Job(requestId = "abc123")
?Javier
01/06/2021, 11:56 AMclass Hello(private val someParam: String) {
val hello: String?
init {
hello = if (someParam.contains("something") someParam else null
}
}
Youssef Shoaib [MOD]
01/06/2021, 12:40 PMvar
s in general, and so a nullable val could be useful with a copy constructor