Surround with null check: suggested for an assignment

#KT-30215 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-03-02 00:04:45 +09:00
committed by Mikhail Glukhikh
parent 2314a38342
commit 1b7627e039
4 changed files with 33 additions and 9 deletions
@@ -0,0 +1,6 @@
// "Surround with null check" "true"
fun foo(s: String?) {
var ss: String = ""
ss = <caret>s
}
@@ -0,0 +1,8 @@
// "Surround with null check" "true"
fun foo(s: String?) {
var ss: String = ""
if (s != null) {
ss = s
}
}