I had the same problem when I wanted the extension...
# announcements
g
I had the same problem when I wanted the extension function
singleIsInstance
Copy code
fun <T, reified R> Iterable<T>.singleIsInstance(): R = ...

//ideal (illegal) usage:
val mine: MyType = somethings.singleIsInstance<MyType>();

//unideal (correct) usage:
val mine: MyType = somethings.singleIsInstance<Something, MyType>()