So what am I doing wrong here? I have a verifier ...
# getting-started
h
So what am I doing wrong here? I have a verifier that checks the types of the content of a
Set<Any>
, but the
it is type
construct fails for me..
Copy code
fun collectionOf(coll: Set<Any>, type: KClass<Any>) : String? {
        return if (coll.any { it is type }) "all is ok" else "contains value(s) of type other than ${type::class.simpleName}"
}

collectionOf(someCollection, Map::class)