Files
kotlin-fork/idea/testData/intentions/branched/ifWhen/whenToIf/whenWithNegativePatterns.kt
T

8 lines
242 B
Kotlin

fun test(obj: Any): String {
return <caret>when (obj) {
!is Iterable<*> -> "not iterable"
!is Collection<*> -> "not collection"
!is MutableCollection<*> -> "not mutable collection"
else -> "unknown"
}
}