Add "Remove annotation" quickfix for empty @Throws

This commit is contained in:
Svyatoslav Scherbina
2020-05-25 18:13:24 +03:00
parent b7a08494ae
commit 6461c1b4f1
7 changed files with 23 additions and 0 deletions
@@ -2,6 +2,7 @@
// ERROR: @Throws must have non-empty class list
// ACTION: Make internal
// ACTION: Make private
// ACTION: Remove annotation
// No compilation error => no quickfix.
<caret>@Throws()
@@ -2,6 +2,7 @@
// ERROR: @Throws must have non-empty class list
// ACTION: Make internal
// ACTION: Make private
// ACTION: Remove annotation
// No compilation error => no quickfix.
<caret>@Throws
@@ -0,0 +1,7 @@
package kotlin
import kotlin.reflect.KClass
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.CONSTRUCTOR)
@Retention(AnnotationRetention.SOURCE)
public annotation class Throws(vararg val exceptionClasses: KClass<out Throwable>)
@@ -0,0 +1,4 @@
// "Remove annotation" "true"
<caret>@Throws
fun removeEmptyThrows() {}
@@ -0,0 +1,3 @@
// "Remove annotation" "true"
fun removeEmptyThrows() {}