Introduce "Redundant else in if" inspection #KT-19668 Fixed
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// WITH_RUNTIME
|
||||
class SomeException : RuntimeException()
|
||||
fun foo(): Int = 1
|
||||
|
||||
fun test(x: Int): Int {
|
||||
if (x == 1) {
|
||||
throw SomeException()
|
||||
} else if (x == 2) {
|
||||
throw SomeException()
|
||||
} <caret>else return foo()
|
||||
}
|
||||
Reference in New Issue
Block a user