Fix AddTargetVersionCheckQuickFix, generate else branch with TODO

when surrounded statement used as expression

#KT-17786 Fixed
#KT-17788 Fixed
This commit is contained in:
Vyacheslav Gerasimov
2017-05-30 15:32:13 +03:00
parent 33c3ba815f
commit 15bfd4439a
13 changed files with 106 additions and 18 deletions
@@ -5,8 +5,10 @@ import android.os.Build
class Test {
fun foo(): Int {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
return android.R.attr.windowTranslucentStatus
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
android.R.attr.windowTranslucentStatus
} else {
TODO("VERSION.SDK_INT < KITKAT")
}
}
}