Ray Rahke
} as T
Unchecked cast: Base to T
Szymon Jeziorski
Iterable<T>.first
T
as?
inline fun <reified T : Base> findFirstInstance(): T = things.firstNotNullOf { it as? T }
firstNotNullOf
null
firstNotNullOf { T? }
FYI23
A modern programming language that makes developers happier.