Psi2Ir: Mark accessors with no bodies as default accessors.
They are currently marked as defined even when they get a default implementation. That makes it hard to figure out if the accessor should be removed when introducing a backing field in the JVM_IR backend.
This commit is contained in:
committed by
Alexander Udalov
parent
fda37eaaae
commit
6c7a904663
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// Please make sure that this test is consistent with the blackbox test "annotationsOnLateinitAccessors.kt"
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
annotation class Ann
|
||||
annotation class AnnRepeat
|
||||
|
||||
class LateinitProperties {
|
||||
@get:Ann
|
||||
lateinit var y0: String
|
||||
|
||||
<!ANNOTATION_TARGETS_NON_EXISTENT_ACCESSOR!>@get:Ann<!>
|
||||
private lateinit var y1: String
|
||||
}
|
||||
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
package
|
||||
|
||||
public final annotation class Ann : kotlin.Annotation {
|
||||
public constructor Ann()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final annotation class AnnRepeat : kotlin.Annotation {
|
||||
public constructor AnnRepeat()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class LateinitProperties {
|
||||
public constructor LateinitProperties()
|
||||
@get:Ann public final lateinit var y0: kotlin.String
|
||||
@get:Ann private final lateinit var y1: kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsTargetingNonExistentAccessor.kt
Vendored
-6
@@ -62,12 +62,6 @@ class PrivateToThis<in I> {
|
||||
}
|
||||
|
||||
class Statics {
|
||||
@get:Ann
|
||||
lateinit var y0: String
|
||||
|
||||
<!ANNOTATION_TARGETS_NON_EXISTENT_ACCESSOR!>@get:Ann<!>
|
||||
private lateinit var y1: String
|
||||
|
||||
companion object {
|
||||
@JvmField
|
||||
<!ANNOTATION_TARGETS_NON_EXISTENT_ACCESSOR!>@get:Ann<!>
|
||||
|
||||
-2
@@ -86,8 +86,6 @@ public final class PrivateToThis</*0*/ in I> {
|
||||
|
||||
public final class Statics {
|
||||
public constructor Statics()
|
||||
@get:Ann public final lateinit var y0: kotlin.String
|
||||
@get:Ann private final lateinit var y1: kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
Reference in New Issue
Block a user