Refactoring: "introduce when subject" is now an inspection

This commit is contained in:
Mikhail Glukhikh
2017-12-19 16:58:04 +03:00
parent a8b01a6b00
commit 6d4b5bc48f
29 changed files with 136 additions and 151 deletions
@@ -0,0 +1,8 @@
fun test(obj: Any): String {
return <caret>when (obj) {
!is Iterable<*> -> "not iterable"
!is Collection<*> -> "not collection"
!is MutableCollection<*> -> "not mutable collection"
else -> "unknown"
}
}