Proper instructions for elvis operator
We should not mark elvis operator unused, for the rhs may have desired side-effects
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
fun foo(a: Any?) {
|
||||
a ?: ""
|
||||
}
|
||||
|
||||
fun foo1(a: Any?) {
|
||||
a ?: sideEffect()
|
||||
}
|
||||
|
||||
fun sideEffect() {}
|
||||
Reference in New Issue
Block a user