Unnecessary local variable: highlight with INFORMATION level when initializer has any multi-line blocks (#3359)

#KT-26752 Fixed
This commit is contained in:
Toshiaki Kameyama
2021-05-20 18:12:41 +09:00
committed by GitHub
parent e82857996f
commit b9a4b60b93
20 changed files with 273 additions and 0 deletions
@@ -0,0 +1,8 @@
// HIGHLIGHT: GENERIC_ERROR_OR_WARNING
fun test(b: Boolean): Int {
return if (b) foo() else bar()
}
fun foo() = 1
fun bar() = 2