Add "Throwable not thrown" Inspection
#KT-11629 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
e0aeb8f7ec
commit
20aa8ebdb0
@@ -0,0 +1,12 @@
|
||||
// PROBLEM: Result of 'createException' call is not thrown
|
||||
// FIX: none
|
||||
class FooException : RuntimeException()
|
||||
|
||||
fun createException() = FooException()
|
||||
|
||||
fun test(i: Int) {
|
||||
val e = when (i) {
|
||||
1 -> FooException()
|
||||
else -> <caret>createException()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user