[K2 AA] add more tests on property annotations
^KT-54311 ^KT-54385
This commit is contained in:
committed by
Space Team
parent
c6742aa4c7
commit
782ff3e4ea
@@ -1,5 +1,21 @@
|
||||
annotation class PropertyAnnotation
|
||||
annotation class FieldAnnotation
|
||||
annotation class GetAnnotation
|
||||
annotation class SetAnnotation
|
||||
annotation class SetparamAnnotation
|
||||
annotation class ExplicitGetAnnotation
|
||||
annotation class ExplicitSetAnnotation
|
||||
annotation class ExplicitSetparamAnnotation
|
||||
|
||||
@property:PropertyAnnotation
|
||||
@field:FieldAnnotation
|
||||
@get:GetAnnotation
|
||||
@set:SetAnnotation
|
||||
@setparam:SetparamAnnotation
|
||||
var x: Int = 0
|
||||
@ExplicitGetAnnotation
|
||||
get() = <caret>field
|
||||
set(value) {
|
||||
@ExplicitSetAnnotation
|
||||
set(@ExplicitSetparamAnnotation value) {
|
||||
field = value
|
||||
}
|
||||
|
||||
+30
-5
@@ -6,11 +6,21 @@ KtBackingFieldSymbol:
|
||||
name: field
|
||||
origin: PROPERTY_BACKING_FIELD
|
||||
owningProperty: KtKotlinPropertySymbol:
|
||||
annotationsList: []
|
||||
annotationsList: [
|
||||
PropertyAnnotation()
|
||||
psi: KtAnnotationEntry
|
||||
FieldAnnotation()
|
||||
psi: KtAnnotationEntry
|
||||
]
|
||||
callableIdIfNonLocal: /x
|
||||
contextReceivers: []
|
||||
getter: KtPropertyGetterSymbol:
|
||||
annotationsList: []
|
||||
annotationsList: [
|
||||
ExplicitGetAnnotation()
|
||||
psi: KtAnnotationEntry
|
||||
GetAnnotation()
|
||||
psi: KtAnnotationEntry
|
||||
]
|
||||
callableIdIfNonLocal: null
|
||||
contextReceivers: []
|
||||
hasBody: true
|
||||
@@ -45,7 +55,12 @@ KtBackingFieldSymbol:
|
||||
receiverType: null
|
||||
returnType: kotlin/Int
|
||||
setter: KtPropertySetterSymbol:
|
||||
annotationsList: []
|
||||
annotationsList: [
|
||||
ExplicitSetAnnotation()
|
||||
psi: KtAnnotationEntry
|
||||
SetAnnotation()
|
||||
psi: KtAnnotationEntry
|
||||
]
|
||||
callableIdIfNonLocal: null
|
||||
contextReceivers: []
|
||||
hasBody: true
|
||||
@@ -57,7 +72,12 @@ KtBackingFieldSymbol:
|
||||
modality: FINAL
|
||||
origin: SOURCE
|
||||
parameter: KtValueParameterSymbol:
|
||||
annotationsList: []
|
||||
annotationsList: [
|
||||
ExplicitSetparamAnnotation()
|
||||
psi: KtAnnotationEntry
|
||||
SetparamAnnotation()
|
||||
psi: KtAnnotationEntry
|
||||
]
|
||||
callableIdIfNonLocal: null
|
||||
contextReceivers: []
|
||||
generatedPrimaryConstructorProperty: null
|
||||
@@ -79,7 +99,12 @@ KtBackingFieldSymbol:
|
||||
typeParameters: []
|
||||
valueParameters: [
|
||||
KtValueParameterSymbol:
|
||||
annotationsList: []
|
||||
annotationsList: [
|
||||
ExplicitSetparamAnnotation()
|
||||
psi: KtAnnotationEntry
|
||||
SetparamAnnotation()
|
||||
psi: KtAnnotationEntry
|
||||
]
|
||||
callableIdIfNonLocal: null
|
||||
contextReceivers: []
|
||||
generatedPrimaryConstructorProperty: null
|
||||
|
||||
Reference in New Issue
Block a user