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:
committed by
Yan Zhulanow
parent
db140b2815
commit
915dc6ce91
+8
@@ -0,0 +1,8 @@
|
||||
// PROBLEM: none
|
||||
fun test(foo: Int?, bar: Int): Int {
|
||||
var i = foo
|
||||
<caret>if (i == null) {
|
||||
return bar
|
||||
}
|
||||
return i
|
||||
}
|
||||
Reference in New Issue
Block a user