halirutan
05/08/2018, 2:09 AMlistOf
solution and it didn't work because of inheritance. Well, I guess then the simple is
solution is directly readable and I stick to this. Thanks for your efforts 🙂Shawn
05/08/2018, 2:10 AMwhen
solution was at least a little bit more concisehalirutan
05/08/2018, 3:07 AMShawn
05/08/2018, 3:09 AMnil2l
05/08/2018, 7:11 AMval v = HashSet<String>()
listOf(String::class, Set::class).any { it.isInstance(v) }
karelpeeters
05/08/2018, 7:20 AMnil2l
05/08/2018, 7:40 AM::class
. And I don’t know if it will require kotlin-reflection as dependency.
As for problem I think it must be solved via common interface, and not if-is’s.