open class A {}
class B : A() {}
val listOfABs = listOf(B(),B(),A(),A())
val list = listOfABs.filterIsInstance<A>() // It will return same list as listOfABs (listOf(B(),B(),A(),A())) because B is subclass and also instance of A
What i am looking for is list should have only listOf(A(),A())