I wonder, is it possible (technicly) to smartcast...
# language-proposals
i
I wonder, is it possible (technicly) to smartcast variables as not null based on extension function check or there would be a problem with such aproach?
Copy code
fun main(args: Array<String>) {


	var imdbId:String? = ""

	if(imdbId != null)
		doSth(imdbId) // ok

	if(imdbId.isNullOrEmpty())
		doSth(imdbId) //Error: type mismatch
}

fun doSth(id:String){

}