AddThrowsAnnotationIntention: improve for mpp

#KT-38391 Fixed
This commit is contained in:
Dmitry Gridin
2020-05-19 14:24:43 +07:00
parent 8b4660031f
commit 499a02ebe3
9 changed files with 86 additions and 3 deletions
@@ -0,0 +1,7 @@
// "Add '@Throws' annotation" "true"
class FooException : Exception()
fun test() {
<caret>throw FooException()
}
@@ -0,0 +1,8 @@
// "Add '@Throws' annotation" "true"
class FooException : Exception()
@Throws(FooException::class)
fun test() {
throw FooException()
}
@@ -0,0 +1,5 @@
// "Add '@Throws' annotation" "false"
fun test() {
<caret>throw Throwable()
}
@@ -0,0 +1,5 @@
// "Add '@Throws' annotation" "true"
fun test() {
<caret>throw Throwable()
}
@@ -0,0 +1,6 @@
// "Add '@Throws' annotation" "true"
@Throws(Throwable::class)
fun test() {
<caret>throw Throwable()
}
@@ -0,0 +1,5 @@
// "Add '@Throws' annotation" "false"
fun test() {
<caret>throw Throwable()
}