[FIR] do not transform annotations on delegated property accessors during implicit type phase
^KT-62874 Fixed
This commit is contained in:
committed by
Space Team
parent
1b636bf450
commit
3941b05909
Vendored
+388
@@ -0,0 +1,388 @@
|
||||
RAW_FIR:
|
||||
FILE: [ResolvedTo(RAW_FIR)] delegateWithAnnotationOnAccessor.kt
|
||||
field:@PROPERTY_DELEGATE_FIELD:Anno[Unresolved](LAZY_EXPRESSION) public? final? [ResolvedTo(RAW_FIR)] var foo: <implicit>by LAZY_EXPRESSION
|
||||
@PROPERTY_GETTER:Anno[Unresolved](LAZY_EXPRESSION) public? [ResolvedTo(RAW_FIR)] get(): <implicit> {
|
||||
^ D|/foo|.getValue#(Null(null), ::R|/foo|)
|
||||
}
|
||||
@PROPERTY_SETTER:Anno[Unresolved](LAZY_EXPRESSION) public? [ResolvedTo(RAW_FIR)] set([ResolvedTo(RAW_FIR)] @SETTER_PARAMETER:Anno[Unresolved](LAZY_EXPRESSION) <set-?>: <implicit>): R|kotlin/Unit| {
|
||||
^ D|/foo|.setValue#(Null(null), ::R|/foo|, R|<local>/foo|)
|
||||
}
|
||||
@Repeatable[Unresolved]() public? final? [ResolvedTo(RAW_FIR)] annotation class Anno : R|kotlin/Annotation| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.s] s: String): R|Anno| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val s: String = R|<local>/s|
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class MyDelegate : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyDelegate] constructor(): R|MyDelegate| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? operator [ResolvedTo(RAW_FIR)] fun getValue([ResolvedTo(RAW_FIR)] thisRef: Any?, [ResolvedTo(RAW_FIR)] property: KProperty<*>): <implicit> { LAZY_BLOCK }
|
||||
|
||||
public? final? operator [ResolvedTo(RAW_FIR)] fun setValue([ResolvedTo(RAW_FIR)] thisRef: Any?, [ResolvedTo(RAW_FIR)] property: KProperty<*>, [ResolvedTo(RAW_FIR)] value: Int): R|kotlin/Unit| { LAZY_BLOCK }
|
||||
|
||||
}
|
||||
|
||||
IMPORTS:
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithAnnotationOnAccessor.kt
|
||||
field:@PROPERTY_DELEGATE_FIELD:Anno[Unresolved](LAZY_EXPRESSION) public? final? [ResolvedTo(RAW_FIR)] var foo: <implicit>by LAZY_EXPRESSION
|
||||
@PROPERTY_GETTER:Anno[Unresolved](LAZY_EXPRESSION) public? [ResolvedTo(RAW_FIR)] get(): <implicit> {
|
||||
^ D|/foo|.getValue#(Null(null), ::R|/foo|)
|
||||
}
|
||||
@PROPERTY_SETTER:Anno[Unresolved](LAZY_EXPRESSION) public? [ResolvedTo(RAW_FIR)] set([ResolvedTo(RAW_FIR)] @SETTER_PARAMETER:Anno[Unresolved](LAZY_EXPRESSION) <set-?>: <implicit>): R|kotlin/Unit| {
|
||||
^ D|/foo|.setValue#(Null(null), ::R|/foo|, R|<local>/foo|)
|
||||
}
|
||||
@Repeatable[Unresolved]() public? final? [ResolvedTo(RAW_FIR)] annotation class Anno : R|kotlin/Annotation| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.s] s: String): R|Anno| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val s: String = R|<local>/s|
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class MyDelegate : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyDelegate] constructor(): R|MyDelegate| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? operator [ResolvedTo(RAW_FIR)] fun getValue([ResolvedTo(RAW_FIR)] thisRef: Any?, [ResolvedTo(RAW_FIR)] property: KProperty<*>): <implicit> { LAZY_BLOCK }
|
||||
|
||||
public? final? operator [ResolvedTo(RAW_FIR)] fun setValue([ResolvedTo(RAW_FIR)] thisRef: Any?, [ResolvedTo(RAW_FIR)] property: KProperty<*>, [ResolvedTo(RAW_FIR)] value: Int): R|kotlin/Unit| { LAZY_BLOCK }
|
||||
|
||||
}
|
||||
|
||||
COMPILER_REQUIRED_ANNOTATIONS:
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithAnnotationOnAccessor.kt
|
||||
field:@PROPERTY_DELEGATE_FIELD:Anno[Unresolved](LAZY_EXPRESSION) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] var foo: <implicit>by LAZY_EXPRESSION
|
||||
@PROPERTY_GETTER:Anno[Unresolved](LAZY_EXPRESSION) public? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] get(): <implicit> {
|
||||
^ D|/foo|.getValue#(Null(null), ::R|/foo|)
|
||||
}
|
||||
@PROPERTY_SETTER:Anno[Unresolved](LAZY_EXPRESSION) public? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] set([ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] @SETTER_PARAMETER:Anno[Unresolved](LAZY_EXPRESSION) <set-?>: <implicit>): R|kotlin/Unit| {
|
||||
^ D|/foo|.setValue#(Null(null), ::R|/foo|, R|<local>/foo|)
|
||||
}
|
||||
@Repeatable[Unresolved]() public? final? [ResolvedTo(RAW_FIR)] annotation class Anno : R|kotlin/Annotation| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.s] s: String): R|Anno| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val s: String = R|<local>/s|
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class MyDelegate : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyDelegate] constructor(): R|MyDelegate| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? operator [ResolvedTo(RAW_FIR)] fun getValue([ResolvedTo(RAW_FIR)] thisRef: Any?, [ResolvedTo(RAW_FIR)] property: KProperty<*>): <implicit> { LAZY_BLOCK }
|
||||
|
||||
public? final? operator [ResolvedTo(RAW_FIR)] fun setValue([ResolvedTo(RAW_FIR)] thisRef: Any?, [ResolvedTo(RAW_FIR)] property: KProperty<*>, [ResolvedTo(RAW_FIR)] value: Int): R|kotlin/Unit| { LAZY_BLOCK }
|
||||
|
||||
}
|
||||
|
||||
COMPANION_GENERATION:
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithAnnotationOnAccessor.kt
|
||||
field:@PROPERTY_DELEGATE_FIELD:Anno[Unresolved](LAZY_EXPRESSION) public? final? [ResolvedTo(COMPANION_GENERATION)] var foo: <implicit>by LAZY_EXPRESSION
|
||||
@PROPERTY_GETTER:Anno[Unresolved](LAZY_EXPRESSION) public? [ResolvedTo(COMPANION_GENERATION)] get(): <implicit> {
|
||||
^ D|/foo|.getValue#(Null(null), ::R|/foo|)
|
||||
}
|
||||
@PROPERTY_SETTER:Anno[Unresolved](LAZY_EXPRESSION) public? [ResolvedTo(COMPANION_GENERATION)] set([ResolvedTo(COMPANION_GENERATION)] @SETTER_PARAMETER:Anno[Unresolved](LAZY_EXPRESSION) <set-?>: <implicit>): R|kotlin/Unit| {
|
||||
^ D|/foo|.setValue#(Null(null), ::R|/foo|, R|<local>/foo|)
|
||||
}
|
||||
@Repeatable[Unresolved]() public? final? [ResolvedTo(RAW_FIR)] annotation class Anno : R|kotlin/Annotation| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.s] s: String): R|Anno| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val s: String = R|<local>/s|
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class MyDelegate : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyDelegate] constructor(): R|MyDelegate| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? operator [ResolvedTo(RAW_FIR)] fun getValue([ResolvedTo(RAW_FIR)] thisRef: Any?, [ResolvedTo(RAW_FIR)] property: KProperty<*>): <implicit> { LAZY_BLOCK }
|
||||
|
||||
public? final? operator [ResolvedTo(RAW_FIR)] fun setValue([ResolvedTo(RAW_FIR)] thisRef: Any?, [ResolvedTo(RAW_FIR)] property: KProperty<*>, [ResolvedTo(RAW_FIR)] value: Int): R|kotlin/Unit| { LAZY_BLOCK }
|
||||
|
||||
}
|
||||
|
||||
SUPER_TYPES:
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithAnnotationOnAccessor.kt
|
||||
field:@PROPERTY_DELEGATE_FIELD:Anno[Unresolved](LAZY_EXPRESSION) public? final? [ResolvedTo(SUPER_TYPES)] var foo: <implicit>by LAZY_EXPRESSION
|
||||
@PROPERTY_GETTER:Anno[Unresolved](LAZY_EXPRESSION) public? [ResolvedTo(SUPER_TYPES)] get(): <implicit> {
|
||||
^ D|/foo|.getValue#(Null(null), ::R|/foo|)
|
||||
}
|
||||
@PROPERTY_SETTER:Anno[Unresolved](LAZY_EXPRESSION) public? [ResolvedTo(SUPER_TYPES)] set([ResolvedTo(SUPER_TYPES)] @SETTER_PARAMETER:Anno[Unresolved](LAZY_EXPRESSION) <set-?>: <implicit>): R|kotlin/Unit| {
|
||||
^ D|/foo|.setValue#(Null(null), ::R|/foo|, R|<local>/foo|)
|
||||
}
|
||||
@Repeatable[Unresolved]() public? final? [ResolvedTo(RAW_FIR)] annotation class Anno : R|kotlin/Annotation| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.s] s: String): R|Anno| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val s: String = R|<local>/s|
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class MyDelegate : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyDelegate] constructor(): R|MyDelegate| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? operator [ResolvedTo(RAW_FIR)] fun getValue([ResolvedTo(RAW_FIR)] thisRef: Any?, [ResolvedTo(RAW_FIR)] property: KProperty<*>): <implicit> { LAZY_BLOCK }
|
||||
|
||||
public? final? operator [ResolvedTo(RAW_FIR)] fun setValue([ResolvedTo(RAW_FIR)] thisRef: Any?, [ResolvedTo(RAW_FIR)] property: KProperty<*>, [ResolvedTo(RAW_FIR)] value: Int): R|kotlin/Unit| { LAZY_BLOCK }
|
||||
|
||||
}
|
||||
|
||||
TYPES:
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithAnnotationOnAccessor.kt
|
||||
field:@PROPERTY_DELEGATE_FIELD:R|Anno|[Types](LAZY_EXPRESSION) public? final? [ResolvedTo(TYPES)] var foo: <implicit>by LAZY_EXPRESSION
|
||||
@PROPERTY_GETTER:R|Anno|[Types](LAZY_EXPRESSION) public? [ResolvedTo(TYPES)] get(): <implicit> {
|
||||
^ D|/foo|.getValue#(Null(null), ::R|/foo|)
|
||||
}
|
||||
@PROPERTY_SETTER:R|Anno|[Types](LAZY_EXPRESSION) public? [ResolvedTo(TYPES)] set([ResolvedTo(TYPES)] @SETTER_PARAMETER:R|Anno|[Types](LAZY_EXPRESSION) <set-?>: <implicit>): R|kotlin/Unit| {
|
||||
^ D|/foo|.setValue#(Null(null), ::R|/foo|, R|<local>/foo|)
|
||||
}
|
||||
@Repeatable[Unresolved]() public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.s] s: String): R|Anno| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val s: String = R|<local>/s|
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class MyDelegate : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyDelegate] constructor(): R|MyDelegate| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? operator [ResolvedTo(RAW_FIR)] fun getValue([ResolvedTo(RAW_FIR)] thisRef: Any?, [ResolvedTo(RAW_FIR)] property: KProperty<*>): <implicit> { LAZY_BLOCK }
|
||||
|
||||
public? final? operator [ResolvedTo(RAW_FIR)] fun setValue([ResolvedTo(RAW_FIR)] thisRef: Any?, [ResolvedTo(RAW_FIR)] property: KProperty<*>, [ResolvedTo(RAW_FIR)] value: Int): R|kotlin/Unit| { LAZY_BLOCK }
|
||||
|
||||
}
|
||||
|
||||
STATUS:
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithAnnotationOnAccessor.kt
|
||||
field:@PROPERTY_DELEGATE_FIELD:R|Anno|[Types](LAZY_EXPRESSION) public final [ResolvedTo(STATUS)] var foo: <implicit>by LAZY_EXPRESSION
|
||||
@PROPERTY_GETTER:R|Anno|[Types](LAZY_EXPRESSION) public [ResolvedTo(STATUS)] get(): <implicit> {
|
||||
^ D|/foo|.getValue#(Null(null), ::R|/foo|)
|
||||
}
|
||||
@PROPERTY_SETTER:R|Anno|[Types](LAZY_EXPRESSION) public [ResolvedTo(STATUS)] set([ResolvedTo(STATUS)] @SETTER_PARAMETER:R|Anno|[Types](LAZY_EXPRESSION) <set-?>: <implicit>): R|kotlin/Unit| {
|
||||
^ D|/foo|.setValue#(Null(null), ::R|/foo|, R|<local>/foo|)
|
||||
}
|
||||
@Repeatable[Unresolved]() public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.s] s: String): R|Anno| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val s: String = R|<local>/s|
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class MyDelegate : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyDelegate] constructor(): R|MyDelegate| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? operator [ResolvedTo(RAW_FIR)] fun getValue([ResolvedTo(RAW_FIR)] thisRef: Any?, [ResolvedTo(RAW_FIR)] property: KProperty<*>): <implicit> { LAZY_BLOCK }
|
||||
|
||||
public? final? operator [ResolvedTo(RAW_FIR)] fun setValue([ResolvedTo(RAW_FIR)] thisRef: Any?, [ResolvedTo(RAW_FIR)] property: KProperty<*>, [ResolvedTo(RAW_FIR)] value: Int): R|kotlin/Unit| { LAZY_BLOCK }
|
||||
|
||||
}
|
||||
|
||||
EXPECT_ACTUAL_MATCHING:
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithAnnotationOnAccessor.kt
|
||||
field:@PROPERTY_DELEGATE_FIELD:R|Anno|[Types](LAZY_EXPRESSION) public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] var foo: <implicit>by LAZY_EXPRESSION
|
||||
@PROPERTY_GETTER:R|Anno|[Types](LAZY_EXPRESSION) public [ResolvedTo(EXPECT_ACTUAL_MATCHING)] get(): <implicit> {
|
||||
^ D|/foo|.getValue#(Null(null), ::R|/foo|)
|
||||
}
|
||||
@PROPERTY_SETTER:R|Anno|[Types](LAZY_EXPRESSION) public [ResolvedTo(EXPECT_ACTUAL_MATCHING)] set([ResolvedTo(EXPECT_ACTUAL_MATCHING)] @SETTER_PARAMETER:R|Anno|[Types](LAZY_EXPRESSION) <set-?>: <implicit>): R|kotlin/Unit| {
|
||||
^ D|/foo|.setValue#(Null(null), ::R|/foo|, R|<local>/foo|)
|
||||
}
|
||||
@Repeatable[Unresolved]() public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.s] s: String): R|Anno| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val s: String = R|<local>/s|
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class MyDelegate : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyDelegate] constructor(): R|MyDelegate| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? operator [ResolvedTo(RAW_FIR)] fun getValue([ResolvedTo(RAW_FIR)] thisRef: Any?, [ResolvedTo(RAW_FIR)] property: KProperty<*>): <implicit> { LAZY_BLOCK }
|
||||
|
||||
public? final? operator [ResolvedTo(RAW_FIR)] fun setValue([ResolvedTo(RAW_FIR)] thisRef: Any?, [ResolvedTo(RAW_FIR)] property: KProperty<*>, [ResolvedTo(RAW_FIR)] value: Int): R|kotlin/Unit| { LAZY_BLOCK }
|
||||
|
||||
}
|
||||
|
||||
CONTRACTS:
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithAnnotationOnAccessor.kt
|
||||
field:@PROPERTY_DELEGATE_FIELD:R|Anno|[Types](LAZY_EXPRESSION) public final [ResolvedTo(CONTRACTS)] var foo: <implicit>by LAZY_EXPRESSION
|
||||
@PROPERTY_GETTER:R|Anno|[Types](LAZY_EXPRESSION) public [ResolvedTo(CONTRACTS)] get(): <implicit> {
|
||||
^ D|/foo|.getValue#(Null(null), ::R|/foo|)
|
||||
}
|
||||
@PROPERTY_SETTER:R|Anno|[Types](LAZY_EXPRESSION) public [ResolvedTo(CONTRACTS)] set([ResolvedTo(CONTRACTS)] @SETTER_PARAMETER:R|Anno|[Types](LAZY_EXPRESSION) <set-?>: <implicit>): R|kotlin/Unit| {
|
||||
^ D|/foo|.setValue#(Null(null), ::R|/foo|, R|<local>/foo|)
|
||||
}
|
||||
@Repeatable[Unresolved]() public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.s] s: String): R|Anno| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val s: String = R|<local>/s|
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class MyDelegate : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyDelegate] constructor(): R|MyDelegate| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? operator [ResolvedTo(RAW_FIR)] fun getValue([ResolvedTo(RAW_FIR)] thisRef: Any?, [ResolvedTo(RAW_FIR)] property: KProperty<*>): <implicit> { LAZY_BLOCK }
|
||||
|
||||
public? final? operator [ResolvedTo(RAW_FIR)] fun setValue([ResolvedTo(RAW_FIR)] thisRef: Any?, [ResolvedTo(RAW_FIR)] property: KProperty<*>, [ResolvedTo(RAW_FIR)] value: Int): R|kotlin/Unit| { LAZY_BLOCK }
|
||||
|
||||
}
|
||||
|
||||
IMPLICIT_TYPES_BODY_RESOLVE:
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithAnnotationOnAccessor.kt
|
||||
field:@PROPERTY_DELEGATE_FIELD:R|Anno|[Types](LAZY_EXPRESSION) public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] var foo: R|kotlin/Int|by R|/MyDelegate.MyDelegate|()
|
||||
@PROPERTY_GETTER:R|Anno|[Types](LAZY_EXPRESSION) public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/Int| {
|
||||
^ D|/foo|.R|/MyDelegate.getValue|(Null(null), ::R|/foo|)
|
||||
}
|
||||
@PROPERTY_SETTER:R|Anno|[Types](LAZY_EXPRESSION) public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] set([ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] @SETTER_PARAMETER:R|Anno|[Types](LAZY_EXPRESSION) <set-?>: R|kotlin/Int|): R|kotlin/Unit| {
|
||||
^ D|/foo|.R|/MyDelegate.setValue|(Null(null), ::R|/foo|, R|<local>/foo|)
|
||||
}
|
||||
@Repeatable[Unresolved]() public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.s] s: String): R|Anno| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val s: String = R|<local>/s|
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String
|
||||
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class MyDelegate : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=MyDelegate] constructor(): R|MyDelegate| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public final operator [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] fun getValue([ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] thisRef: R|kotlin/Any?|, [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] property: R|kotlin/reflect/KProperty<*>|): R|kotlin/Int| {
|
||||
^getValue Int(42)
|
||||
}
|
||||
|
||||
public final operator [ResolvedTo(CONTRACTS)] fun setValue([ResolvedTo(CONTRACTS)] thisRef: R|kotlin/Any?|, [ResolvedTo(CONTRACTS)] property: R|kotlin/reflect/KProperty<*>|, [ResolvedTo(CONTRACTS)] value: R|kotlin/Int|): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ANNOTATION_ARGUMENTS:
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithAnnotationOnAccessor.kt
|
||||
field:@PROPERTY_DELEGATE_FIELD:R|Anno|[Types](s = String(delegate)) public final [ResolvedTo(ANNOTATION_ARGUMENTS)] var foo: R|kotlin/Int|by R|/MyDelegate.MyDelegate|()
|
||||
@PROPERTY_GETTER:R|Anno|[Types](s = String(getter)) public [ResolvedTo(ANNOTATION_ARGUMENTS)] get(): R|kotlin/Int| {
|
||||
^ D|/foo|.R|/MyDelegate.getValue|(Null(null), ::R|/foo|)
|
||||
}
|
||||
@PROPERTY_SETTER:R|Anno|[Types](s = String(setter)) public [ResolvedTo(ANNOTATION_ARGUMENTS)] set([ResolvedTo(ANNOTATION_ARGUMENTS)] @SETTER_PARAMETER:R|Anno|[Types](s = String(parameter)) <set-?>: R|kotlin/Int|): R|kotlin/Unit| {
|
||||
^ D|/foo|.R|/MyDelegate.setValue|(Null(null), ::R|/foo|, R|<local>/foo|)
|
||||
}
|
||||
@R|kotlin/annotation/Repeatable|[Types]() public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.s] s: R|kotlin/String|): R|Anno| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val s: R|kotlin/String| = R|<local>/s|
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class MyDelegate : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=MyDelegate] constructor(): R|MyDelegate| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public final operator [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] fun getValue([ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] thisRef: R|kotlin/Any?|, [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] property: R|kotlin/reflect/KProperty<*>|): R|kotlin/Int| {
|
||||
^getValue Int(42)
|
||||
}
|
||||
|
||||
public final operator [ResolvedTo(CONTRACTS)] fun setValue([ResolvedTo(CONTRACTS)] thisRef: R|kotlin/Any?|, [ResolvedTo(CONTRACTS)] property: R|kotlin/reflect/KProperty<*>|, [ResolvedTo(CONTRACTS)] value: R|kotlin/Int|): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BODY_RESOLVE:
|
||||
FILE: [ResolvedTo(IMPORTS)] delegateWithAnnotationOnAccessor.kt
|
||||
field:@PROPERTY_DELEGATE_FIELD:R|Anno|[Types](s = String(delegate)) public final [ResolvedTo(BODY_RESOLVE)] var foo: R|kotlin/Int|by R|/MyDelegate.MyDelegate|()
|
||||
@PROPERTY_GETTER:R|Anno|[Types](s = String(getter)) public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| {
|
||||
^ D|/foo|.R|/MyDelegate.getValue|(Null(null), ::R|/foo|)
|
||||
}
|
||||
@PROPERTY_SETTER:R|Anno|[Types](s = String(setter)) public [ResolvedTo(BODY_RESOLVE)] set([ResolvedTo(BODY_RESOLVE)] @SETTER_PARAMETER:R|Anno|[Types](s = String(parameter)) <set-?>: R|kotlin/Int|): R|kotlin/Unit| {
|
||||
^ D|/foo|.R|/MyDelegate.setValue|(Null(null), ::R|/foo|, R|<local>/foo|)
|
||||
}
|
||||
@R|kotlin/annotation/Repeatable|[Types]() public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.s] s: R|kotlin/String|): R|Anno| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val s: R|kotlin/String| = R|<local>/s|
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class MyDelegate : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=MyDelegate] constructor(): R|MyDelegate| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public final operator [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] fun getValue([ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] thisRef: R|kotlin/Any?|, [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] property: R|kotlin/reflect/KProperty<*>|): R|kotlin/Int| {
|
||||
^getValue Int(42)
|
||||
}
|
||||
|
||||
public final operator [ResolvedTo(CONTRACTS)] fun setValue([ResolvedTo(CONTRACTS)] thisRef: R|kotlin/Any?|, [ResolvedTo(CONTRACTS)] property: R|kotlin/reflect/KProperty<*>|, [ResolvedTo(CONTRACTS)] value: R|kotlin/Int|): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
FILE RAW TO BODY:
|
||||
FILE: [ResolvedTo(BODY_RESOLVE)] delegateWithAnnotationOnAccessor.kt
|
||||
field:@PROPERTY_DELEGATE_FIELD:R|Anno|[Types](s = String(delegate)) public final [ResolvedTo(BODY_RESOLVE)] var foo: R|kotlin/Int|by R|/MyDelegate.MyDelegate|()
|
||||
@PROPERTY_GETTER:R|Anno|[Types](s = String(getter)) public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| {
|
||||
^ D|/foo|.R|/MyDelegate.getValue|(Null(null), ::R|/foo|)
|
||||
}
|
||||
@PROPERTY_SETTER:R|Anno|[Types](s = String(setter)) public [ResolvedTo(BODY_RESOLVE)] set([ResolvedTo(BODY_RESOLVE)] @SETTER_PARAMETER:R|Anno|[Types](s = String(parameter)) <set-?>: R|kotlin/Int|): R|kotlin/Unit| {
|
||||
^ D|/foo|.R|/MyDelegate.setValue|(Null(null), ::R|/foo|, R|<local>/foo|)
|
||||
}
|
||||
@R|kotlin/annotation/Repeatable|[Types]() public final [ResolvedTo(BODY_RESOLVE)] annotation class Anno : R|kotlin/Annotation| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Anno] constructor([ResolvedTo(BODY_RESOLVE)] [CorrespondingProperty=/Anno.s] s: R|kotlin/String|): R|Anno| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val s: R|kotlin/String| = R|<local>/s|
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Anno] get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
public final [ResolvedTo(BODY_RESOLVE)] class MyDelegate : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyDelegate] constructor(): R|MyDelegate| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final operator [ResolvedTo(BODY_RESOLVE)] fun getValue([ResolvedTo(BODY_RESOLVE)] thisRef: R|kotlin/Any?|, [ResolvedTo(BODY_RESOLVE)] property: R|kotlin/reflect/KProperty<*>|): R|kotlin/Int| {
|
||||
^getValue Int(42)
|
||||
}
|
||||
|
||||
public final operator [ResolvedTo(BODY_RESOLVE)] fun setValue([ResolvedTo(BODY_RESOLVE)] thisRef: R|kotlin/Any?|, [ResolvedTo(BODY_RESOLVE)] property: R|kotlin/reflect/KProperty<*>|, [ResolvedTo(BODY_RESOLVE)] value: R|kotlin/Int|): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
+13
-5
@@ -186,7 +186,7 @@ open class FirDeclarationsResolveTransformer(
|
||||
|
||||
property.transformAccessors(SetterResolutionMode.FULLY_RESOLVE, shouldResolveEverything = true)
|
||||
} else {
|
||||
transformPropertyAccessorsWithDelegate(property, delegate)
|
||||
transformPropertyAccessorsWithDelegate(property, delegate, shouldResolveEverything)
|
||||
if (property.delegateFieldSymbol != null) {
|
||||
replacePropertyReferenceTypeInDelegateAccessors(property)
|
||||
}
|
||||
@@ -298,7 +298,11 @@ open class FirDeclarationsResolveTransformer(
|
||||
(property.delegate as? FirFunctionCall)?.replacePropertyReferenceTypeInDelegateAccessors(property)
|
||||
}
|
||||
|
||||
private fun transformPropertyAccessorsWithDelegate(property: FirProperty, delegate: FirExpression) {
|
||||
private fun transformPropertyAccessorsWithDelegate(
|
||||
property: FirProperty,
|
||||
delegate: FirExpression,
|
||||
shouldResolveEverything: Boolean,
|
||||
) {
|
||||
val isImplicitTypedProperty = property.returnTypeRef is FirImplicitTypeRef
|
||||
|
||||
context.forPropertyDelegateAccessors(property, resolutionContext, callCompleter) {
|
||||
@@ -317,7 +321,11 @@ open class FirDeclarationsResolveTransformer(
|
||||
// It's necessary because we need to supply the property type as the 3rd argument for `setValue` and there might be uninferred
|
||||
// variables from `getValue`.
|
||||
// The same logic was used at K1 (see org.jetbrains.kotlin.resolve.DelegatedPropertyResolver.inferDelegateTypeFromGetSetValueMethods)
|
||||
property.transformAccessors(if (isImplicitTypedProperty) SetterResolutionMode.SKIP else SetterResolutionMode.FULLY_RESOLVE)
|
||||
property.transformAccessors(
|
||||
if (isImplicitTypedProperty) SetterResolutionMode.SKIP else SetterResolutionMode.FULLY_RESOLVE,
|
||||
shouldResolveEverything,
|
||||
)
|
||||
|
||||
val completedCalls = completeCandidates()
|
||||
|
||||
val finalSubstitutor = createFinalSubstitutor()
|
||||
@@ -346,7 +354,7 @@ open class FirDeclarationsResolveTransformer(
|
||||
|
||||
// `isImplicitTypedProperty` means we haven't run setter resolution yet (see its second usage)
|
||||
if (isImplicitTypedProperty) {
|
||||
property.resolveSetter(mayResolveSetterBody = true, shouldResolveEverything = true)
|
||||
property.resolveSetter(mayResolveSetterBody = true, shouldResolveEverything = shouldResolveEverything)
|
||||
}
|
||||
|
||||
dataFlowAnalyzer.exitDelegateExpression(delegate)
|
||||
@@ -498,7 +506,7 @@ open class FirDeclarationsResolveTransformer(
|
||||
val hadExplicitType = variable.returnTypeRef !is FirImplicitTypeRef
|
||||
|
||||
if (delegate != null) {
|
||||
transformPropertyAccessorsWithDelegate(variable, delegate)
|
||||
transformPropertyAccessorsWithDelegate(variable, delegate, shouldResolveEverything = true)
|
||||
if (variable.delegateFieldSymbol != null) {
|
||||
replacePropertyReferenceTypeInDelegateAccessors(variable)
|
||||
}
|
||||
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// IGNORE_REVERSED_RESOLVE
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
@get:Anno(<!ANNOTATION_ARGUMENT_MUST_BE_CONST, TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM!>foo<!>)
|
||||
@set:Anno(<!ANNOTATION_ARGUMENT_MUST_BE_CONST!>foo<!>)
|
||||
@setparam:Anno(<!ANNOTATION_ARGUMENT_MUST_BE_CONST!>foo<!>)
|
||||
@delegate:Anno(<!ANNOTATION_ARGUMENT_MUST_BE_CONST!>foo<!>)
|
||||
var foo by MyDelegate()
|
||||
|
||||
@Repeatable
|
||||
annotation class Anno(val i: Int)
|
||||
|
||||
class MyDelegate {
|
||||
operator fun getValue(thisRef: Any?, property: KProperty<*>) = 42
|
||||
operator fun setValue(thisRef: Any?, property: KProperty<*>, value: Int) {}
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// IGNORE_REVERSED_RESOLVE
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
@get:Anno(<!ANNOTATION_ARGUMENT_MUST_BE_CONST!>foo<!>)
|
||||
|
||||
Reference in New Issue
Block a user