Eugen Martynov
10/22/2025, 8:52 AMclass CafHttpResult<T> {
var result: T = null
}
But I write <T: Any> for that. Was it always like this?Eugen Martynov
10/22/2025, 8:55 AMEugen Martynov
10/22/2025, 8:59 AMIf we don't specify the upper bound, Kotlin will assume a default of Any?PHondogo
10/22/2025, 8:59 AMclass CafHttpResult<T> {
var result: T? = null
}Eugen Martynov
10/22/2025, 9:10 AM?Eugen Martynov
10/22/2025, 9:11 AMCafHttpResult<Int?> then it translates for me to var result: Int??PHondogo
10/22/2025, 9:12 AMPHondogo
10/22/2025, 9:12 AMFilip Wiesner
10/22/2025, 9:15 AMI was surprised that I need to addIf?
T was Int ( CafHttpResult<Int>() ), var result: T = null would become var result: Int = null and that does not make sense. How would you expect it would work? 🤔Eugen Martynov
10/22/2025, 9:18 AMEugen Martynov
10/22/2025, 9:19 AM? is definitely improvementEugen Martynov
10/22/2025, 9:19 AMephemient
10/22/2025, 1:48 PMT, such as CafHttpResult<Int?>() which would be ok, or CafHttpResult<Int>() which would not, as Filip saidephemient
10/22/2025, 1:50 PM