JvmName should have @Retention(AnnotationRetention.BINARY)
(TODO: fix JVM BE)
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
class A {
|
||||
val OK: String = "OK"
|
||||
@JvmName("OK") get
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun main(args: Array<String>) {
|
||||
if (A().OK != "OK") throw java.lang.AssertionError()
|
||||
}
|
||||
+6
@@ -101,6 +101,12 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("JvmNameOnAccessor.A.kt")
|
||||
public void testJvmNameOnAccessor() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/JvmNameOnAccessor.A.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("KotlinPropertyAsAnnotationParameter.A.kt")
|
||||
public void testKotlinPropertyAsAnnotationParameter() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/KotlinPropertyAsAnnotationParameter.A.kt");
|
||||
|
||||
@@ -48,7 +48,7 @@ public annotation class JvmStatic
|
||||
* @property name the name of the element.
|
||||
*/
|
||||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.FILE)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
@MustBeDocumented
|
||||
public annotation class JvmName(public val name: String)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user