Make kotlin.Metadata public

Prohibit explicit usage of `@Metadata` to prevent possible
AnnotationFormatError at runtime

 #KT-23602 Fixed
This commit is contained in:
Alexander Udalov
2018-06-22 18:53:39 +02:00
committed by Ilya Gorbunov
parent 8102e512d3
commit f423403167
4 changed files with 24 additions and 3 deletions
@@ -1,5 +1,3 @@
// !DIAGNOSTICS: -INVISIBLE_MEMBER -INVISIBLE_REFERENCE -EXPOSED_PARAMETER_TYPE
<!EXPLICIT_METADATA_IS_DISALLOWED!>@Metadata<!>
class A
@@ -11,7 +11,8 @@ package kotlin
*/
@Retention(AnnotationRetention.RUNTIME)
@Target(AnnotationTarget.CLASS)
internal annotation class Metadata(
@SinceKotlin("1.3")
public annotation class Metadata(
/**
* A kind of the metadata this annotation encodes. Kotlin compiler recognizes the following kinds (see KotlinClassHeader.Kind):
*
@@ -26,6 +26,17 @@ public class kotlin/KotlinNullPointerException : java/lang/NullPointerException
public fun <init> (Ljava/lang/String;)V
}
public abstract interface annotation class kotlin/Metadata : java/lang/annotation/Annotation {
public abstract fun bv ()[I
public abstract fun d1 ()[Ljava/lang/String;
public abstract fun d2 ()[Ljava/lang/String;
public abstract fun k ()I
public abstract fun mv ()[I
public abstract fun pn ()Ljava/lang/String;
public abstract fun xi ()I
public abstract fun xs ()Ljava/lang/String;
}
public class kotlin/NoWhenBranchMatchedException : java/lang/RuntimeException {
public fun <init> ()V
public fun <init> (Ljava/lang/String;)V
@@ -89,6 +89,17 @@ public final class kotlin/LazyThreadSafetyMode : java/lang/Enum {
public static fun values ()[Lkotlin/LazyThreadSafetyMode;
}
public abstract interface annotation class kotlin/Metadata : java/lang/annotation/Annotation {
public abstract fun bv ()[I
public abstract fun d1 ()[Ljava/lang/String;
public abstract fun d2 ()[Ljava/lang/String;
public abstract fun k ()I
public abstract fun mv ()[I
public abstract fun pn ()Ljava/lang/String;
public abstract fun xi ()I
public abstract fun xs ()Ljava/lang/String;
}
public class kotlin/NoWhenBranchMatchedException : java/lang/RuntimeException {
public fun <init> ()V
public fun <init> (Ljava/lang/String;)V