Add inspection for check/require/checkNotNull/requireNotNull
#KT-30640 Fixed #KT-22412 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
64780293d3
commit
90b0ea73dc
+7
@@ -0,0 +1,7 @@
|
||||
// FIX: Replace with 'requireNotNull()' call
|
||||
// WITH_RUNTIME
|
||||
fun test(foo: Int?) {
|
||||
<caret>if (foo == null) {
|
||||
throw IllegalArgumentException("test")
|
||||
}
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
// FIX: Replace with 'requireNotNull()' call
|
||||
// WITH_RUNTIME
|
||||
fun test(foo: Int?) {
|
||||
requireNotNull(foo) { "test" }
|
||||
}
|
||||
Reference in New Issue
Block a user