Fold initializer & if to elvis: add test, rename tests, simplify code
Enhancement for KT-27016
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// IS_APPLICABLE: false
|
||||
interface A {
|
||||
fun a() {}
|
||||
}
|
||||
|
||||
open class B : A {
|
||||
fun b() {}
|
||||
}
|
||||
|
||||
interface C : A {
|
||||
fun c() {}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val b = B()
|
||||
if (<caret>b !is C) {
|
||||
return
|
||||
}
|
||||
b.b()
|
||||
b.c()
|
||||
}
|
||||
Reference in New Issue
Block a user