Report experimental diagnostics on inaccessible (wrt SinceKotlin) API

If a declaration is annotated both with SinceKotlin and WasExperimental
and the SinceKotlin version makes it inaccessible, the experimental
checker must regard it as experimental, with markers specified in the
WasExperimental annotation arguments. So only errors/warnings about the
experimentality are going to be reported in this case, and no error that
the declaration is unavailable because of a low API version
This commit is contained in:
Alexander Udalov
2018-05-04 16:23:40 +02:00
parent 1f0d3d9c7c
commit 7d74508529
6 changed files with 48 additions and 24 deletions
@@ -52,7 +52,7 @@ annotation class UseExperimental(
)
@Target(CLASS, PROPERTY, CONSTRUCTOR, FUNCTION)
@Target(CLASS, PROPERTY, CONSTRUCTOR, FUNCTION, TYPEALIAS)
@Retention(BINARY)
internal annotation class WasExperimental(
vararg val markerClass: KClass<out Annotation>