Introduce "Redundant else in if" inspection #KT-19668 Fixed

This commit is contained in:
Mikhail Glukhikh
2018-11-29 15:23:59 +03:00
parent ca87e53f04
commit 7cbc8e8b76
24 changed files with 430 additions and 0 deletions
@@ -0,0 +1,16 @@
// WITH_RUNTIME
class SomeException : RuntimeException()
fun foo(): Int = 1
fun bar(): Int = 2
fun test(x: Boolean, y: Boolean) {
if (x) {
return
} else if (y) {
throw SomeException()
}
// comment1
foo()
// comment2
bar()
}