Add "Remove annotation" quickfix for @Throws override mismatch
This commit is contained in:
+7
@@ -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>)
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Remove annotation" "true"
|
||||
|
||||
class MyException : Throwable()
|
||||
|
||||
interface Base {
|
||||
@Throws(Throwable::class)
|
||||
fun foo()
|
||||
}
|
||||
|
||||
class Derived : Base {
|
||||
<caret>@Throws(MyException::class)
|
||||
override fun foo() {}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Remove annotation" "true"
|
||||
|
||||
class MyException : Throwable()
|
||||
|
||||
interface Base {
|
||||
@Throws(Throwable::class)
|
||||
fun foo()
|
||||
}
|
||||
|
||||
class Derived : Base {
|
||||
override fun foo() {}
|
||||
}
|
||||
Reference in New Issue
Block a user