Add when support for USELESS_IS_CHECK quick fix, related to KT-18965

This commit is contained in:
Andrius Semionovas
2017-07-27 23:05:42 +03:00
committed by Mikhail Glukhikh
parent e0aca97f9f
commit f42808af94
11 changed files with 158 additions and 5 deletions
@@ -0,0 +1,12 @@
// "Remove useless is check" "true"
interface Base
interface Derived: Base
fun foo(bar: Base):Int {
return when {
bar is Derived -> 0
bar <caret>!is Base -> 42
else -> 1
}
}