Introduce typealias JvmRepeatable for j.l.a.Repeatable
#KT-12794 Fixed
This commit is contained in:
+3
-1
@@ -1,13 +1,15 @@
|
||||
// !LANGUAGE: +RepeatableAnnotations
|
||||
// !API_VERSION: LATEST
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// FULL_JDK
|
||||
// JVM_TARGET: 1.8
|
||||
// STDLIB_JDK8
|
||||
|
||||
// java.lang.NoSuchMethodError: java.lang.Class.getAnnotationsByType
|
||||
// IGNORE_BACKEND: ANDROID
|
||||
|
||||
@java.lang.annotation.Repeatable(As::class)
|
||||
@JvmRepeatable(As::class)
|
||||
annotation class A(val value: String)
|
||||
|
||||
annotation class As(val value: Array<A>)
|
||||
|
||||
Vendored
+3
-1
@@ -1,14 +1,16 @@
|
||||
// !LANGUAGE: +RepeatableAnnotations
|
||||
// !API_VERSION: LATEST
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// FULL_JDK
|
||||
// JVM_TARGET: 1.8
|
||||
// STDLIB_JDK8
|
||||
|
||||
// java.lang.NoSuchMethodError: java.lang.Class.getAnnotationsByType
|
||||
// IGNORE_BACKEND: ANDROID
|
||||
|
||||
@Repeatable
|
||||
@java.lang.annotation.Repeatable(As::class)
|
||||
@JvmRepeatable(As::class)
|
||||
annotation class A(val value: String)
|
||||
|
||||
annotation class As(val value: Array<A>)
|
||||
|
||||
+3
-1
@@ -1,13 +1,15 @@
|
||||
// !LANGUAGE: +RepeatableAnnotations
|
||||
// !API_VERSION: LATEST
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// FULL_JDK
|
||||
// JVM_TARGET: 1.8
|
||||
// STDLIB_JDK8
|
||||
|
||||
package test
|
||||
|
||||
@Repeatable
|
||||
@java.lang.annotation.Repeatable(As::class)
|
||||
@JvmRepeatable(As::class)
|
||||
annotation class A(val value: String)
|
||||
|
||||
annotation class As(val value: Array<A>)
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
@file:kotlin.jvm.JvmPackageName("kotlin.jvm.jdk8")
|
||||
|
||||
package kotlin.jvm
|
||||
|
||||
/**
|
||||
* Makes the annotation class repeatable in Java and Kotlin. A repeatable annotation can be applied more than once
|
||||
* on the same element.
|
||||
*
|
||||
* @property value the container annotation class, used to hold repeated entries of the annotation in the JVM bytecode.
|
||||
*/
|
||||
@Suppress("NEWER_VERSION_IN_SINCE_KOTLIN")
|
||||
@SinceKotlin("1.6")
|
||||
public typealias JvmRepeatable = java.lang.annotation.Repeatable
|
||||
Reference in New Issue
Block a user