SLC: create backing field for deprecated property
...since they still appear at JVM bytecode. Also, ULC doesn't look at deprecated annotation for bail-out criteria. ^KT-65393 fixed
This commit is contained in:
+1
-1
@@ -440,7 +440,7 @@ private fun hasBackingField(property: KtPropertySymbol): Boolean {
|
||||
val fieldUseSite = AnnotationUseSiteTarget.FIELD
|
||||
if (property.isExpect ||
|
||||
property.modality == Modality.ABSTRACT ||
|
||||
property.isHiddenOrSynthetic(fieldUseSite, fieldUseSite.toOptionalFilter())
|
||||
property.hasJvmSyntheticAnnotation(fieldUseSite.toOptionalFilter())
|
||||
) return false
|
||||
|
||||
return hasBackingFieldByPsi ?: property.hasBackingField
|
||||
|
||||
Vendored
+3
@@ -5,6 +5,9 @@ public final class Test /* test.pkg.Test*/ {
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
private java.lang.String pOld_accessors_deprecatedOnGetter = null /* initializer type: null */;
|
||||
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
private java.lang.String pOld_accessors_deprecatedOnProperty = null /* initializer type: null */;
|
||||
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
private java.lang.String pOld_accessors_deprecatedOnSetter = null /* initializer type: null */;
|
||||
|
||||
|
||||
+3
@@ -5,6 +5,9 @@ public final class Test /* test.pkg.Test*/ {
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
private java.lang.String pOld_getter_deprecatedOnGetter = null /* initializer type: null */;
|
||||
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
private java.lang.String pOld_getter_deprecatedOnProperty = null /* initializer type: null */;
|
||||
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
private java.lang.String pOld_getter_deprecatedOnSetter = null /* initializer type: null */;
|
||||
|
||||
|
||||
Vendored
+3
@@ -5,6 +5,9 @@ public final class Test /* test.pkg.Test*/ {
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private java.lang.String pOld_noAccessor_deprecatedOnGetter = "42" /* initializer type: java.lang.String */;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private java.lang.String pOld_noAccessor_deprecatedOnProperty = "42" /* initializer type: java.lang.String */;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private java.lang.String pOld_noAccessor_deprecatedOnSetter = "42" /* initializer type: java.lang.String */;
|
||||
|
||||
|
||||
+3
@@ -5,6 +5,9 @@ public final class Test /* test.pkg.Test*/ {
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
private java.lang.String pOld_setter_deprecatedOnGetter = null /* initializer type: null */;
|
||||
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
private java.lang.String pOld_setter_deprecatedOnProperty = null /* initializer type: null */;
|
||||
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
private java.lang.String pOld_setter_deprecatedOnSetter = null /* initializer type: null */;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user