I’m wondering is there a way how to say compiler that my “function” checks nullability ?
In following example
val label: String? = ""
if(!label.isNullOrBlank()) {
label.length//complains as label type is nullable and has to be handled
}
the null check is happenning in the isNullOrBlank so I’m sure it’s notnull,
but I want to avoid using !! or .let{}.
Anyway of doing it via annotation or somehow ?