If then to elvis: no more allowed for if expressions with Unit result
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
// IS_APPLICABLE: false
|
||||
|
||||
open class Some {
|
||||
fun bar() {}
|
||||
}
|
||||
|
||||
object Obj : Some()
|
||||
|
||||
fun foo(arg: Any?) {
|
||||
<caret>if (arg is Some) {
|
||||
arg.bar()
|
||||
}
|
||||
else {
|
||||
Obj.bar()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user