// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintMissingSuperCallInspection
package android.support.annotation
@Retention(AnnotationRetention.BINARY)
@Target(AnnotationTarget.FUNCTION)
annotation class CallSuper
@Suppress("UsePropertyAccessSyntax", "UNUSED_VARIABLE", "unused", "UNUSED_PARAMETER", "DEPRECATION")
class CallSuperTest {
private class Child : Parent() {
override fun test1() {
// ERROR
}
override fun test2() {
// ERROR
}
override fun test3() {
// ERROR
}
override fun test4(arg: Int) {
// ERROR
}
override fun test4(arg: String) {
// OK
}
override fun test5(arg1: Int, arg2: Boolean, arg3: Map, *>, // ERROR
arg4: Array, vararg arg5: Int) {
}
override fun test5() {
// ERROR
super.test6() // (wrong super)
}
override fun test6() {
// OK
val x = 5
super.test6()
System.out.println(x)
}
}
private open class Parent : ParentParent() {
@CallSuper
protected open fun test1() {
}
override fun test3() {
super.test3()
}
@CallSuper
protected open fun test4(arg: Int) {
}
protected open fun test4(arg: String) {
}
@CallSuper
protected open fun test5() {
}
@CallSuper
protected open fun test5(arg1: Int, arg2: Boolean, arg3: Map, *>,
arg4: Array, vararg arg5: Int) {
}
}
private open class ParentParent : ParentParentParent() {
@CallSuper
protected open fun test2() {
}
@CallSuper
protected open fun test3() {
}
@CallSuper
protected open fun test6() {
}
@CallSuper
protected fun test7() {
}
}
private open class ParentParentParent
}