FoldInitializerAndIfToElvisInspection: don't report when 'var' variable has no explicit type and it's used as not nullable type

#KT-38349 Fixed
This commit is contained in:
Toshiaki Kameyama
2020-04-18 14:20:16 +09:00
committed by Yan Zhulanow
parent db140b2815
commit 915dc6ce91
8 changed files with 80 additions and 0 deletions
@@ -0,0 +1,8 @@
// PROBLEM: none
fun test(foo: Int?, bar: Int): Int {
var i = foo
<caret>if (i == null) {
return bar
}
return i
}