[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
|
var x: Int = 0
|
||||||
|
@ExplicitGetAnnotation
|
||||||
get() = <caret>field
|
get() = <caret>field
|
||||||
set(value) {
|
@ExplicitSetAnnotation
|
||||||
|
set(@ExplicitSetparamAnnotation value) {
|
||||||
field = value
|
field = value
|
||||||
}
|
}
|
||||||
|
|||||||
+30
-5
@@ -6,11 +6,21 @@ KtBackingFieldSymbol:
|
|||||||
name: field
|
name: field
|
||||||
origin: PROPERTY_BACKING_FIELD
|
origin: PROPERTY_BACKING_FIELD
|
||||||
owningProperty: KtKotlinPropertySymbol:
|
owningProperty: KtKotlinPropertySymbol:
|
||||||
annotationsList: []
|
annotationsList: [
|
||||||
|
PropertyAnnotation()
|
||||||
|
psi: KtAnnotationEntry
|
||||||
|
FieldAnnotation()
|
||||||
|
psi: KtAnnotationEntry
|
||||||
|
]
|
||||||
callableIdIfNonLocal: /x
|
callableIdIfNonLocal: /x
|
||||||
contextReceivers: []
|
contextReceivers: []
|
||||||
getter: KtPropertyGetterSymbol:
|
getter: KtPropertyGetterSymbol:
|
||||||
annotationsList: []
|
annotationsList: [
|
||||||
|
ExplicitGetAnnotation()
|
||||||
|
psi: KtAnnotationEntry
|
||||||
|
GetAnnotation()
|
||||||
|
psi: KtAnnotationEntry
|
||||||
|
]
|
||||||
callableIdIfNonLocal: null
|
callableIdIfNonLocal: null
|
||||||
contextReceivers: []
|
contextReceivers: []
|
||||||
hasBody: true
|
hasBody: true
|
||||||
@@ -45,7 +55,12 @@ KtBackingFieldSymbol:
|
|||||||
receiverType: null
|
receiverType: null
|
||||||
returnType: kotlin/Int
|
returnType: kotlin/Int
|
||||||
setter: KtPropertySetterSymbol:
|
setter: KtPropertySetterSymbol:
|
||||||
annotationsList: []
|
annotationsList: [
|
||||||
|
ExplicitSetAnnotation()
|
||||||
|
psi: KtAnnotationEntry
|
||||||
|
SetAnnotation()
|
||||||
|
psi: KtAnnotationEntry
|
||||||
|
]
|
||||||
callableIdIfNonLocal: null
|
callableIdIfNonLocal: null
|
||||||
contextReceivers: []
|
contextReceivers: []
|
||||||
hasBody: true
|
hasBody: true
|
||||||
@@ -57,7 +72,12 @@ KtBackingFieldSymbol:
|
|||||||
modality: FINAL
|
modality: FINAL
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
parameter: KtValueParameterSymbol:
|
parameter: KtValueParameterSymbol:
|
||||||
annotationsList: []
|
annotationsList: [
|
||||||
|
ExplicitSetparamAnnotation()
|
||||||
|
psi: KtAnnotationEntry
|
||||||
|
SetparamAnnotation()
|
||||||
|
psi: KtAnnotationEntry
|
||||||
|
]
|
||||||
callableIdIfNonLocal: null
|
callableIdIfNonLocal: null
|
||||||
contextReceivers: []
|
contextReceivers: []
|
||||||
generatedPrimaryConstructorProperty: null
|
generatedPrimaryConstructorProperty: null
|
||||||
@@ -79,7 +99,12 @@ KtBackingFieldSymbol:
|
|||||||
typeParameters: []
|
typeParameters: []
|
||||||
valueParameters: [
|
valueParameters: [
|
||||||
KtValueParameterSymbol:
|
KtValueParameterSymbol:
|
||||||
annotationsList: []
|
annotationsList: [
|
||||||
|
ExplicitSetparamAnnotation()
|
||||||
|
psi: KtAnnotationEntry
|
||||||
|
SetparamAnnotation()
|
||||||
|
psi: KtAnnotationEntry
|
||||||
|
]
|
||||||
callableIdIfNonLocal: null
|
callableIdIfNonLocal: null
|
||||||
contextReceivers: []
|
contextReceivers: []
|
||||||
generatedPrimaryConstructorProperty: null
|
generatedPrimaryConstructorProperty: null
|
||||||
|
|||||||
Reference in New Issue
Block a user