Add language feature for changed name of property annotations method
#KT-31352 Fixed
This commit is contained in:
@@ -1157,7 +1157,10 @@ class KotlinTypeMapper @JvmOverloads constructor(
|
|||||||
|
|
||||||
fun mapSyntheticMethodForPropertyAnnotations(descriptor: PropertyDescriptor): Method {
|
fun mapSyntheticMethodForPropertyAnnotations(descriptor: PropertyDescriptor): Method {
|
||||||
val receiver = descriptor.extensionReceiverParameter
|
val receiver = descriptor.extensionReceiverParameter
|
||||||
val name = JvmAbi.getSyntheticMethodNameForAnnotatedProperty(mapFunctionName(descriptor.getter!!, OwnerKind.IMPLEMENTATION))
|
val baseName = if (languageVersionSettings.supportsFeature(LanguageFeature.UseGetterNameForPropertyAnnotationsMethodOnJvm)) {
|
||||||
|
mapFunctionName(descriptor.getter!!, OwnerKind.IMPLEMENTATION)
|
||||||
|
} else descriptor.name.asString()
|
||||||
|
val name = JvmAbi.getSyntheticMethodNameForAnnotatedProperty(baseName)
|
||||||
val desc = if (receiver == null) "()V" else "(${mapType(receiver.type)})V"
|
val desc = if (receiver == null) "()V" else "(${mapType(receiver.type)})V"
|
||||||
return Method(name, desc)
|
return Method(name, desc)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// !LANGUAGE: +UseGetterNameForPropertyAnnotationsMethodOnJvm
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// WITH_REFLECT
|
// WITH_REFLECT
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ public final class A {
|
|||||||
private final @AnnField @AnnParameterField @AnnTypeField field a: int
|
private final @AnnField @AnnParameterField @AnnTypeField field a: int
|
||||||
private final @AnnField @AnnTypeField field x: int
|
private final @AnnField @AnnTypeField field x: int
|
||||||
public method <init>(@AnnParameterProperty @AnnParameterField p0: int): void
|
public method <init>(@AnnParameterProperty @AnnParameterField p0: int): void
|
||||||
public synthetic deprecated static @AnnProperty @AnnFieldProperty @AnnParameterProperty method getA$annotations(): void
|
public synthetic deprecated static @AnnProperty @AnnFieldProperty @AnnParameterProperty method a$annotations(): void
|
||||||
public final method getA(): int
|
public final method getA(): int
|
||||||
public synthetic deprecated static @AnnProperty @AnnFieldProperty method getX$annotations(): void
|
|
||||||
public final method getX(): int
|
public final method getX(): int
|
||||||
|
public synthetic deprecated static @AnnProperty @AnnFieldProperty method x$annotations(): void
|
||||||
}
|
}
|
||||||
|
|
||||||
@kotlin.annotation.Target
|
@kotlin.annotation.Target
|
||||||
|
|||||||
@@ -7,15 +7,15 @@ public final class A {
|
|||||||
private field y: int
|
private field y: int
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
public method <init>(@AnnParam p0: int, @AnnParam p1: int): void
|
public method <init>(@AnnParam p0: int, @AnnParam p1: int): void
|
||||||
public synthetic deprecated static @AnnProp @AnnProp2 method getP$annotations(): void
|
|
||||||
public final @AnnGetter method getP(): int
|
public final @AnnGetter method getP(): int
|
||||||
public synthetic deprecated static @AnnProp @AnnProp2 @AnnDelegate method getS$annotations(): void
|
|
||||||
public final @org.jetbrains.annotations.NotNull method getS(): java.lang.String
|
public final @org.jetbrains.annotations.NotNull method getS(): java.lang.String
|
||||||
public synthetic deprecated static @AnnProp2 method getX$annotations(): void
|
|
||||||
public final method getX(): int
|
public final method getX(): int
|
||||||
public final @AnnGetter method getY(): int
|
public final @AnnGetter method getY(): int
|
||||||
|
public synthetic deprecated static @AnnProp @AnnProp2 method p$annotations(): void
|
||||||
|
public synthetic deprecated static @AnnProp @AnnProp2 @AnnDelegate method s$annotations(): void
|
||||||
public final @AnnSetter method setP(@AnnParam p0: int): void
|
public final @AnnSetter method setP(@AnnParam p0: int): void
|
||||||
public final @AnnSetter method setY(p0: int): void
|
public final @AnnSetter method setY(p0: int): void
|
||||||
|
public synthetic deprecated static @AnnProp2 method x$annotations(): void
|
||||||
}
|
}
|
||||||
|
|
||||||
@java.lang.annotation.Retention
|
@java.lang.annotation.Retention
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ public final class test/Foo {
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
synthetic final class test/Foo__InlineOnlyPropertyMultifileKt {
|
synthetic final class test/Foo__InlineOnlyPropertyMultifileKt {
|
||||||
public final static method foo(): void
|
public final static method foo(): void
|
||||||
public synthetic deprecated static @kotlin.internal.InlineOnly method getProp$annotations(): void
|
|
||||||
private final static method getProp(): java.lang.String
|
private final static method getProp(): java.lang.String
|
||||||
|
public synthetic deprecated static @kotlin.internal.InlineOnly method prop$annotations(): void
|
||||||
private final static method setProp(p0: java.lang.String): void
|
private final static method setProp(p0: java.lang.String): void
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class Foo {
|
public final class Foo {
|
||||||
public method <init>(): void
|
public method <init>(): void
|
||||||
public synthetic deprecated static @kotlin.internal.InlineOnly method getProp$annotations(): void
|
|
||||||
private final method getProp(): java.lang.String
|
private final method getProp(): java.lang.String
|
||||||
private final @kotlin.internal.InlineOnly method getProp2(): java.lang.String
|
private final @kotlin.internal.InlineOnly method getProp2(): java.lang.String
|
||||||
|
public synthetic deprecated static @kotlin.internal.InlineOnly method prop$annotations(): void
|
||||||
private final method setProp(p0: java.lang.String): void
|
private final method setProp(p0: java.lang.String): void
|
||||||
public final method setProp2(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
|
public final method setProp2(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
|
||||||
}
|
}
|
||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class InlineOnlyPropertyKt {
|
public final class InlineOnlyPropertyKt {
|
||||||
public synthetic deprecated static @kotlin.internal.InlineOnly method getProp$annotations(): void
|
|
||||||
private final static method getProp(): java.lang.String
|
private final static method getProp(): java.lang.String
|
||||||
private final static @kotlin.internal.InlineOnly method getProp2(): java.lang.String
|
private final static @kotlin.internal.InlineOnly method getProp2(): java.lang.String
|
||||||
|
public synthetic deprecated static @kotlin.internal.InlineOnly method prop$annotations(): void
|
||||||
private final static method setProp(p0: java.lang.String): void
|
private final static method setProp(p0: java.lang.String): void
|
||||||
public final static method setProp2(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
|
public final static method setProp2(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+8
-8
@@ -55,35 +55,35 @@ public final class Z {
|
|||||||
public method equals(p0: java.lang.Object): boolean
|
public method equals(p0: java.lang.Object): boolean
|
||||||
public static method equals-impl(p0: int, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
|
public static method equals-impl(p0: int, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
|
||||||
public final static method equals-impl0(p0: int, p1: int): boolean
|
public final static method equals-impl0(p0: int, p1: int): boolean
|
||||||
public synthetic deprecated static @A method getNonOverridingExtVal$annotations(p0: java.lang.String): void
|
|
||||||
public final static @AGet method getNonOverridingExtVal-impl(p0: int, @AReceiver @org.jetbrains.annotations.NotNull p1: java.lang.String): int
|
public final static @AGet method getNonOverridingExtVal-impl(p0: int, @AReceiver @org.jetbrains.annotations.NotNull p1: java.lang.String): int
|
||||||
public synthetic deprecated static @A method getNonOverridingExtVar$annotations(p0: java.lang.String): void
|
|
||||||
public final static @AGet method getNonOverridingExtVar-impl(p0: int, @AReceiver @org.jetbrains.annotations.NotNull p1: java.lang.String): int
|
public final static @AGet method getNonOverridingExtVar-impl(p0: int, @AReceiver @org.jetbrains.annotations.NotNull p1: java.lang.String): int
|
||||||
public synthetic deprecated static @A method getNonOverridingVal$annotations(): void
|
|
||||||
public final static @AGet method getNonOverridingVal-impl(p0: int): int
|
public final static @AGet method getNonOverridingVal-impl(p0: int): int
|
||||||
public synthetic deprecated static @A method getNonOverridingVar$annotations(): void
|
|
||||||
public final static @AGet method getNonOverridingVar-impl(p0: int): int
|
public final static @AGet method getNonOverridingVar-impl(p0: int): int
|
||||||
public synthetic deprecated static @A method getOverridingExtVal$annotations(p0: java.lang.String): void
|
|
||||||
public @AGet method getOverridingExtVal(@AReceiver @org.jetbrains.annotations.NotNull p0: java.lang.String): int
|
public @AGet method getOverridingExtVal(@AReceiver @org.jetbrains.annotations.NotNull p0: java.lang.String): int
|
||||||
public static @AGet method getOverridingExtVal-impl(p0: int, @AReceiver @org.jetbrains.annotations.NotNull p1: java.lang.String): int
|
public static @AGet method getOverridingExtVal-impl(p0: int, @AReceiver @org.jetbrains.annotations.NotNull p1: java.lang.String): int
|
||||||
public synthetic deprecated static @A method getOverridingExtVar$annotations(p0: java.lang.String): void
|
|
||||||
public @AGet method getOverridingExtVar(@AReceiver @org.jetbrains.annotations.NotNull p0: java.lang.String): int
|
public @AGet method getOverridingExtVar(@AReceiver @org.jetbrains.annotations.NotNull p0: java.lang.String): int
|
||||||
public static @AGet method getOverridingExtVar-impl(p0: int, @AReceiver @org.jetbrains.annotations.NotNull p1: java.lang.String): int
|
public static @AGet method getOverridingExtVar-impl(p0: int, @AReceiver @org.jetbrains.annotations.NotNull p1: java.lang.String): int
|
||||||
public synthetic deprecated static @A method getOverridingVal$annotations(): void
|
|
||||||
public @AGet method getOverridingVal(): int
|
public @AGet method getOverridingVal(): int
|
||||||
public static @AGet method getOverridingVal-impl(p0: int): int
|
public static @AGet method getOverridingVal-impl(p0: int): int
|
||||||
public synthetic deprecated static @A method getOverridingVar$annotations(): void
|
|
||||||
public @AGet method getOverridingVar(): int
|
public @AGet method getOverridingVar(): int
|
||||||
public static @AGet method getOverridingVar-impl(p0: int): int
|
public static @AGet method getOverridingVar-impl(p0: int): int
|
||||||
public final @AGet method getX(): int
|
public final @AGet method getX(): int
|
||||||
public method hashCode(): int
|
public method hashCode(): int
|
||||||
public static method hashCode-impl(p0: int): int
|
public static method hashCode-impl(p0: int): int
|
||||||
public final static @A method nonOverridingExtFun-impl(p0: int, @AReceiver @org.jetbrains.annotations.NotNull p1: java.lang.String): void
|
public final static @A method nonOverridingExtFun-impl(p0: int, @AReceiver @org.jetbrains.annotations.NotNull p1: java.lang.String): void
|
||||||
|
public synthetic deprecated static @A method nonOverridingExtVal$annotations(p0: java.lang.String): void
|
||||||
|
public synthetic deprecated static @A method nonOverridingExtVar$annotations(p0: java.lang.String): void
|
||||||
public final static @A method nonOverridingFun-impl(p0: int): void
|
public final static @A method nonOverridingFun-impl(p0: int): void
|
||||||
|
public synthetic deprecated static @A method nonOverridingVal$annotations(): void
|
||||||
|
public synthetic deprecated static @A method nonOverridingVar$annotations(): void
|
||||||
public @A method overridingExtFun(@AReceiver @org.jetbrains.annotations.NotNull p0: java.lang.String): void
|
public @A method overridingExtFun(@AReceiver @org.jetbrains.annotations.NotNull p0: java.lang.String): void
|
||||||
public static @A method overridingExtFun-impl(p0: int, @AReceiver @org.jetbrains.annotations.NotNull p1: java.lang.String): void
|
public static @A method overridingExtFun-impl(p0: int, @AReceiver @org.jetbrains.annotations.NotNull p1: java.lang.String): void
|
||||||
|
public synthetic deprecated static @A method overridingExtVal$annotations(p0: java.lang.String): void
|
||||||
|
public synthetic deprecated static @A method overridingExtVar$annotations(p0: java.lang.String): void
|
||||||
public @A method overridingFun(): void
|
public @A method overridingFun(): void
|
||||||
public static @A method overridingFun-impl(p0: int): void
|
public static @A method overridingFun-impl(p0: int): void
|
||||||
|
public synthetic deprecated static @A method overridingVal$annotations(): void
|
||||||
|
public synthetic deprecated static @A method overridingVar$annotations(): void
|
||||||
public final static @ASet method setNonOverridingExtVar-impl(p0: int, @AReceiver @org.jetbrains.annotations.NotNull p1: java.lang.String, @ASetParam p2: int): void
|
public final static @ASet method setNonOverridingExtVar-impl(p0: int, @AReceiver @org.jetbrains.annotations.NotNull p1: java.lang.String, @ASetParam p2: int): void
|
||||||
public final static @ASet method setNonOverridingVar-impl(p0: int, @ASetParam p1: int): void
|
public final static @ASet method setNonOverridingVar-impl(p0: int, @ASetParam p1: int): void
|
||||||
public @ASet method setOverridingExtVar(@AReceiver @org.jetbrains.annotations.NotNull p0: java.lang.String, @ASetParam p1: int): void
|
public @ASet method setOverridingExtVar(@AReceiver @org.jetbrains.annotations.NotNull p0: java.lang.String, @ASetParam p1: int): void
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ public final class Foo {
|
|||||||
inner class Foo$Nested
|
inner class Foo$Nested
|
||||||
public method <init>(p0: int): void
|
public method <init>(p0: int): void
|
||||||
public final method bar(): void
|
public final method bar(): void
|
||||||
public synthetic deprecated static method getX$annotations(): void
|
|
||||||
public final method getX(): int
|
public final method getX(): int
|
||||||
public final method setX(p0: int): void
|
public final method setX(p0: int): void
|
||||||
|
public synthetic deprecated static method x$annotations(): void
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -3,8 +3,8 @@ public final class test/TopLevel$Companion {
|
|||||||
inner class test/TopLevel$Companion
|
inner class test/TopLevel$Companion
|
||||||
private method <init>(): void
|
private method <init>(): void
|
||||||
public final method a(): void
|
public final method a(): void
|
||||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method getQ$annotations(): void
|
|
||||||
public final @org.jetbrains.annotations.NotNull method getQ(): java.lang.String
|
public final @org.jetbrains.annotations.NotNull method getQ(): java.lang.String
|
||||||
|
public synthetic deprecated static @kotlin.jvm.JvmStatic method q$annotations(): void
|
||||||
}
|
}
|
||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
|
|||||||
+2
-2
@@ -13,9 +13,9 @@ interface Test {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TESTED_OBJECT_KIND: function
|
// TESTED_OBJECT_KIND: function
|
||||||
// TESTED_OBJECTS: Test, getTest$annotations
|
// TESTED_OBJECTS: Test, test$annotations
|
||||||
// ABSENT: TRUE
|
// ABSENT: TRUE
|
||||||
|
|
||||||
// TESTED_OBJECT_KIND: function
|
// TESTED_OBJECT_KIND: function
|
||||||
// TESTED_OBJECTS: Test$DefaultImpls, getTest$annotations
|
// TESTED_OBJECTS: Test$DefaultImpls, test$annotations
|
||||||
// FLAGS: ACC_PUBLIC, ACC_STATIC, ACC_SYNTHETIC, ACC_DEPRECATED
|
// FLAGS: ACC_PUBLIC, ACC_STATIC, ACC_SYNTHETIC, ACC_DEPRECATED
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ interface Test {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TESTED_OBJECT_KIND: function
|
// TESTED_OBJECT_KIND: function
|
||||||
// TESTED_OBJECTS: Test, getTest$annotations
|
// TESTED_OBJECTS: Test, test$annotations
|
||||||
// ABSENT: TRUE
|
// ABSENT: TRUE
|
||||||
|
|
||||||
// TESTED_OBJECT_KIND: function
|
// TESTED_OBJECT_KIND: function
|
||||||
// TESTED_OBJECTS: Test$DefaultImpls, getTest$annotations
|
// TESTED_OBJECTS: Test$DefaultImpls, test$annotations
|
||||||
// FLAGS: ACC_PUBLIC, ACC_STATIC, ACC_SYNTHETIC, ACC_DEPRECATED
|
// FLAGS: ACC_PUBLIC, ACC_STATIC, ACC_SYNTHETIC, ACC_DEPRECATED
|
||||||
|
|||||||
+1
-1
@@ -7,5 +7,5 @@ class Foo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TESTED_OBJECT_KIND: function
|
// TESTED_OBJECT_KIND: function
|
||||||
// TESTED_OBJECTS: Foo, getProp$annotations
|
// TESTED_OBJECTS: Foo, prop$annotations
|
||||||
// FLAGS: ACC_DEPRECATED, ACC_STATIC, ACC_SYNTHETIC, ACC_PRIVATE
|
// FLAGS: ACC_DEPRECATED, ACC_STATIC, ACC_SYNTHETIC, ACC_PRIVATE
|
||||||
|
|||||||
+1
-1
@@ -7,5 +7,5 @@ open class Foo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TESTED_OBJECT_KIND: function
|
// TESTED_OBJECT_KIND: function
|
||||||
// TESTED_OBJECTS: Foo, getProp$annotations
|
// TESTED_OBJECTS: Foo, prop$annotations
|
||||||
// FLAGS: ACC_DEPRECATED, ACC_STATIC, ACC_SYNTHETIC, ACC_PROTECTED
|
// FLAGS: ACC_DEPRECATED, ACC_STATIC, ACC_SYNTHETIC, ACC_PROTECTED
|
||||||
|
|||||||
+1
-1
@@ -7,5 +7,5 @@ class Foo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TESTED_OBJECT_KIND: function
|
// TESTED_OBJECT_KIND: function
|
||||||
// TESTED_OBJECTS: Foo, getProp$annotations
|
// TESTED_OBJECTS: Foo, prop$annotations
|
||||||
// FLAGS: ACC_DEPRECATED, ACC_STATIC, ACC_SYNTHETIC, ACC_PUBLIC
|
// FLAGS: ACC_DEPRECATED, ACC_STATIC, ACC_SYNTHETIC, ACC_PUBLIC
|
||||||
|
|||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
// !LANGUAGE: +UseGetterNameForPropertyAnnotationsMethodOnJvm
|
||||||
|
// WITH_RUNTIME
|
||||||
|
// IGNORE_BACKEND: JVM_IR
|
||||||
|
class Foo {
|
||||||
|
annotation class Anno
|
||||||
|
|
||||||
|
@Anno
|
||||||
|
@get:JvmName("jvmName")
|
||||||
|
val prop: Int
|
||||||
|
get() = 42
|
||||||
|
}
|
||||||
|
|
||||||
|
// TESTED_OBJECT_KIND: function
|
||||||
|
// TESTED_OBJECTS: Foo, jvmName$annotations
|
||||||
|
// FLAGS: ACC_DEPRECATED, ACC_STATIC, ACC_SYNTHETIC, ACC_PUBLIC
|
||||||
+1
-1
@@ -37,7 +37,7 @@ public class SyntheticMethodForAnnotatedPropertyGenTest extends CodegenTestCase
|
|||||||
return "properties/syntheticMethod";
|
return "properties/syntheticMethod";
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String TEST_SYNTHETIC_METHOD_NAME = JvmAbi.getSyntheticMethodNameForAnnotatedProperty("getProperty");
|
private static final String TEST_SYNTHETIC_METHOD_NAME = JvmAbi.getSyntheticMethodNameForAnnotatedProperty("property");
|
||||||
|
|
||||||
public void testInClass() {
|
public void testInClass() {
|
||||||
loadFile();
|
loadFile();
|
||||||
|
|||||||
+5
@@ -1160,6 +1160,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
|
|||||||
public void testPublicProperty() throws Exception {
|
public void testPublicProperty() throws Exception {
|
||||||
runTest("compiler/testData/writeFlags/property/syntheticAnnotationsMethod/publicProperty.kt");
|
runTest("compiler/testData/writeFlags/property/syntheticAnnotationsMethod/publicProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("withGetterJvmName.kt")
|
||||||
|
public void testWithGetterJvmName() throws Exception {
|
||||||
|
runTest("compiler/testData/writeFlags/property/syntheticAnnotationsMethod/withGetterJvmName.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/writeFlags/property/visibility")
|
@TestMetadata("compiler/testData/writeFlags/property/visibility")
|
||||||
|
|||||||
+5
@@ -1160,6 +1160,11 @@ public class IrWriteFlagsTestGenerated extends AbstractIrWriteFlagsTest {
|
|||||||
public void testPublicProperty() throws Exception {
|
public void testPublicProperty() throws Exception {
|
||||||
runTest("compiler/testData/writeFlags/property/syntheticAnnotationsMethod/publicProperty.kt");
|
runTest("compiler/testData/writeFlags/property/syntheticAnnotationsMethod/publicProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("withGetterJvmName.kt")
|
||||||
|
public void testWithGetterJvmName() throws Exception {
|
||||||
|
runTest("compiler/testData/writeFlags/property/syntheticAnnotationsMethod/withGetterJvmName.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/writeFlags/property/visibility")
|
@TestMetadata("compiler/testData/writeFlags/property/visibility")
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ enum class LanguageFeature(
|
|||||||
BareArrayClassLiteral(KOTLIN_1_4),
|
BareArrayClassLiteral(KOTLIN_1_4),
|
||||||
ProhibitGenericArrayClassLiteral(KOTLIN_1_4),
|
ProhibitGenericArrayClassLiteral(KOTLIN_1_4),
|
||||||
NonParenthesizedAnnotationsOnFunctionalTypes(KOTLIN_1_4),
|
NonParenthesizedAnnotationsOnFunctionalTypes(KOTLIN_1_4),
|
||||||
|
UseGetterNameForPropertyAnnotationsMethodOnJvm(KOTLIN_1_4),
|
||||||
|
|
||||||
ProperVisibilityForCompanionObjectInstanceField(sinceVersion = null, kind = BUG_FIX),
|
ProperVisibilityForCompanionObjectInstanceField(sinceVersion = null, kind = BUG_FIX),
|
||||||
// Temporarily disabled, see KT-27084/KT-22379
|
// Temporarily disabled, see KT-27084/KT-22379
|
||||||
|
|||||||
@@ -50,9 +50,12 @@ public final class JvmAbi {
|
|||||||
|
|
||||||
public static final String IMPL_SUFFIX_FOR_INLINE_CLASS_MEMBERS = "-impl";
|
public static final String IMPL_SUFFIX_FOR_INLINE_CLASS_MEMBERS = "-impl";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param baseName JVM name of the property getter since Kotlin 1.4, or Kotlin name of the property otherwise.
|
||||||
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
public static String getSyntheticMethodNameForAnnotatedProperty(@NotNull String getterName) {
|
public static String getSyntheticMethodNameForAnnotatedProperty(@NotNull String baseName) {
|
||||||
return getterName + ANNOTATED_PROPERTY_METHOD_NAME_SUFFIX;
|
return baseName + ANNOTATED_PROPERTY_METHOD_NAME_SUFFIX;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@ class JvmMetadataVersion(versionArray: IntArray, val isStrictSemantics: Boolean)
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@JvmField
|
@JvmField
|
||||||
val INSTANCE = JvmMetadataVersion(1, 1, 16)
|
val INSTANCE = JvmMetadataVersion(1, 1, 15)
|
||||||
|
|
||||||
@JvmField
|
@JvmField
|
||||||
val INVALID_VERSION = JvmMetadataVersion()
|
val INVALID_VERSION = JvmMetadataVersion()
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@ package {
|
|||||||
// requires language version 1.3.0 (level=ERROR, message="property must not be used!")
|
// requires language version 1.3.0 (level=ERROR, message="property must not be used!")
|
||||||
// field: property:Ljava/lang/String;
|
// field: property:Ljava/lang/String;
|
||||||
// getter: getProperty()Ljava/lang/String;
|
// getter: getProperty()Ljava/lang/String;
|
||||||
// synthetic method for annotations: getProperty$annotations()V
|
// synthetic method for annotations: property$annotations()V
|
||||||
public final val property: kotlin/String /* = ... */
|
public final val property: kotlin/String /* = ... */
|
||||||
public final get
|
public final get
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ public final class TestAnno2 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Anno3(value = "property")
|
@Anno3(value = "property")
|
||||||
public static void getB$annotations() {
|
public static void b$annotations() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public final class AnnotationsTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Anno(value = "top-level-val")
|
@Anno(value = "top-level-val")
|
||||||
public static void getTopLevelVal$annotations(int p0) {
|
public static void topLevelVal$annotations(int p0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
@@ -82,14 +82,14 @@ public abstract class Test {
|
|||||||
public abstract java.lang.String abstractMethod();
|
public abstract java.lang.String abstractMethod();
|
||||||
|
|
||||||
@Anno(value = "abstract-val")
|
@Anno(value = "abstract-val")
|
||||||
public static void getAbstractVal$annotations() {
|
public static void abstractVal$annotations() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
public abstract java.lang.String getAbstractVal();
|
public abstract java.lang.String getAbstractVal();
|
||||||
|
|
||||||
@Anno(value = "v-property")
|
@Anno(value = "v-property")
|
||||||
public static void getV$annotations() {
|
public static void v$annotations() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public final class Bar {
|
|||||||
|
|
||||||
@Anno()
|
@Anno()
|
||||||
@PropertyAnno()
|
@PropertyAnno()
|
||||||
public static void getA$annotations() {
|
public static void a$annotations() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
@@ -43,7 +43,7 @@ public final class Baz {
|
|||||||
public final java.lang.String a = "";
|
public final java.lang.String a = "";
|
||||||
|
|
||||||
@Anno()
|
@Anno()
|
||||||
public static void getA$annotations() {
|
public static void a$annotations() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Baz() {
|
public Baz() {
|
||||||
@@ -75,7 +75,7 @@ public final class Foo {
|
|||||||
private final java.lang.String a = null;
|
private final java.lang.String a = null;
|
||||||
|
|
||||||
@PropertyAnno()
|
@PropertyAnno()
|
||||||
public static void getA$annotations() {
|
public static void a$annotations() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ public final class Test {
|
|||||||
* prop2.
|
* prop2.
|
||||||
*/
|
*/
|
||||||
@Anno()
|
@Anno()
|
||||||
public static void getProp2$annotations() {
|
public static void prop2$annotations() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public final class JvmStaticTest {
|
|||||||
@kotlin.Metadata()
|
@kotlin.Metadata()
|
||||||
public static final class Companion {
|
public static final class Companion {
|
||||||
|
|
||||||
public static void getOne$annotations() {
|
public static void one$annotations() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public final int getOne() {
|
public final int getOne() {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public final class Test {
|
|||||||
@kotlin.Metadata()
|
@kotlin.Metadata()
|
||||||
public static final class A {
|
public static final class A {
|
||||||
|
|
||||||
public static void getTest$annotations() {
|
public static void test$annotations() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ public final class MyActivity {
|
|||||||
private final int propF = 0;
|
private final int propF = 0;
|
||||||
|
|
||||||
@Bind(id = lib.R.id.textView)
|
@Bind(id = lib.R.id.textView)
|
||||||
public static void getA$annotations() {
|
public static void a$annotations() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public final int getA() {
|
public final int getA() {
|
||||||
@@ -144,7 +144,7 @@ public final class MyActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bind(id = lib.R.id.textView)
|
@Bind(id = lib.R.id.textView)
|
||||||
public static void getB$annotations() {
|
public static void b$annotations() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public final int getB() {
|
public final int getB() {
|
||||||
@@ -152,7 +152,7 @@ public final class MyActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bind(id = app.R.layout.mainActivity)
|
@Bind(id = app.R.layout.mainActivity)
|
||||||
public static void getC$annotations() {
|
public static void c$annotations() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public final int getC() {
|
public final int getC() {
|
||||||
@@ -160,7 +160,7 @@ public final class MyActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bind(id = app.R.layout.mainActivity)
|
@Bind(id = app.R.layout.mainActivity)
|
||||||
public static void getD$annotations() {
|
public static void d$annotations() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public final int getD() {
|
public final int getD() {
|
||||||
@@ -169,7 +169,7 @@ public final class MyActivity {
|
|||||||
|
|
||||||
@Anno(a1 = app.B.a1, a2 = app.B.a2, a3 = app.B.a3, a4 = app.B.a4, a5 = app.B.a5, a6 = app.B.a6, a7 = app.B.a7, a8 = app.B.a8, a9 = "A")
|
@Anno(a1 = app.B.a1, a2 = app.B.a2, a3 = app.B.a3, a4 = app.B.a4, a5 = app.B.a5, a6 = app.B.a6, a7 = app.B.a7, a8 = app.B.a8, a9 = "A")
|
||||||
@Bind(id = app.R2.layout.mainActivity)
|
@Bind(id = app.R2.layout.mainActivity)
|
||||||
public static void getE$annotations() {
|
public static void e$annotations() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public final int getE() {
|
public final int getE() {
|
||||||
@@ -177,7 +177,7 @@ public final class MyActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bind(id = app.B.id.textView)
|
@Bind(id = app.B.id.textView)
|
||||||
public static void getF$annotations() {
|
public static void f$annotations() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public final int getF() {
|
public final int getF() {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public final class Test {
|
|||||||
|
|
||||||
@Anno2()
|
@Anno2()
|
||||||
@Anno()
|
@Anno()
|
||||||
public static void getProp$annotations() {
|
public static void prop$annotations() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ public final class Test {
|
|||||||
@lib.Anno(value = "3", construct = {"C"})
|
@lib.Anno(value = "3", construct = {"C"})
|
||||||
@lib.Anno(value = "2", construct = {"A", "B"})
|
@lib.Anno(value = "2", construct = {"A", "B"})
|
||||||
@lib.Anno(value = "1")
|
@lib.Anno(value = "1")
|
||||||
public static void getValue$annotations() {
|
public static void value$annotations() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public final class TopLevelKt {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Anno(value = "extpr")
|
@Anno(value = "extpr")
|
||||||
public static void getExtensionProperty$annotations(java.lang.Object p0) {
|
public static void extensionProperty$annotations(java.lang.Object p0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
|||||||
Reference in New Issue
Block a user