ReplaceGuardClause inspection: check contracts availability

This commit is contained in:
Toshiaki Kameyama
2019-07-01 19:19:11 +09:00
committed by Mikhail Glukhikh
parent 8cbcb66197
commit 2ca0056cd0
3 changed files with 20 additions and 0 deletions
@@ -0,0 +1,11 @@
// PROBLEM: none
// WITH_RUNTIME
// LANGUAGE_VERSION: 1.2
fun test(foo: Int?) {
<caret>if (foo == null) {
throw IllegalArgumentException("test")
}
bar(foo)
}
fun bar(i: Int) {}