Surround with null check : applicable also for TYPE_MISMATCH
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
// "Surround with null check" "true"
|
||||
|
||||
fun foo(x: String?) {
|
||||
bar(<caret>x)
|
||||
}
|
||||
|
||||
fun bar(s: String) = s.hashCode()
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Surround with null check" "true"
|
||||
|
||||
fun foo(x: String?) {
|
||||
if (x != null) {
|
||||
bar(x)
|
||||
}
|
||||
}
|
||||
|
||||
fun bar(s: String) = s.hashCode()
|
||||
Reference in New Issue
Block a user