"Redundant 'requireNotNull' or 'checkNotNull' call": don't remove first argument if function is used as expression
#KT-31404 Fixed
This commit is contained in:
committed by
Dmitry Gridin
parent
574178882a
commit
cf4471ba53
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(i: Int) {
|
||||
val a = <caret>requireNotNull(i)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(i: Int) {
|
||||
val a = i
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(i: Int) {
|
||||
println(<caret>requireNotNull(i) { "" })
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(i: Int) {
|
||||
println(i)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(i: Int) {
|
||||
"${<caret>checkNotNull(i)}"
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(i: Int) {
|
||||
"${i}"
|
||||
}
|
||||
Reference in New Issue
Block a user