Skip explicit API inspection for data class properties and add inspection for public API in interfaces

Add tests for almost all the cases
This commit is contained in:
Leonid Startsev
2019-10-14 20:20:48 +03:00
parent ebb7e434c8
commit 5ab262c977
20 changed files with 426 additions and 5 deletions
@@ -0,0 +1,33 @@
interface <!NO_EXPLICIT_VISIBILITY_IN_API_MODE!>I1<!> {
<!NO_EXPLICIT_VISIBILITY_IN_API_MODE!>fun i()<!>
}
public interface I2 {
<!NO_EXPLICIT_VISIBILITY_IN_API_MODE!>fun i()<!>
}
public interface I3 {
public fun i()
public val v: Int
}
public interface I4 {
public fun i(): Int
public val v: Int
}
public class Impl: I3 {
override fun i() {}
override val v: Int
get() = 10
}
public class Impl2: I4 {
<!NO_EXPLICIT_RETURN_TYPE_IN_API_MODE!>override fun i()<!> = 10
<!NO_EXPLICIT_RETURN_TYPE_IN_API_MODE!>override val v<!> = 10
}
private class PrivateImpl: I4 {
override fun i() = 10
override val v = 10
}