crummy
03/04/2021, 7:58 AMval l = listOf<Any>("foo")
l.first { it is String}.length // unresolved reference: length
And is there a way to get this to work with a smartcast?crummy
03/04/2021, 8:00 AMl.filterIsInstance<String>().first().length
Youssef Shoaib [MOD]
03/04/2021, 9:53 AMBornyls Deen
03/04/2021, 3:54 PMJoel
03/04/2021, 6:29 PMfirstIsInstanceOrNull
🙂Orhan Tozan
03/07/2021, 12:51 AMfirstInstanceOrNull
, or findInstance