nwh
09/28/2018, 10:25 PM@JvmName("sampleSet")
fun sample(function: () -> Set<Any>) {}
fun sample(function: () -> Any) {}
fun main(args: Array<String>) {
sample { setOf() }
sample { "" }
}
Why does the sample { "" }
error (type mismatch, expected Set
)? Shouldn't it be able to resolve to the method?