ReplaceGuardClause inspection: do not remove 'else' branch
#KT-32797 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
a3a3c52c24
commit
a6690e4e35
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(foo: Int?) {
|
||||
<caret>if (foo == null) throw IllegalArgumentException("test") else println(1)
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
fun test(foo: Int?) {
|
||||
<caret>requireNotNull(foo) { "test" }
|
||||
println(1)
|
||||
}
|
||||
Reference in New Issue
Block a user