FIR: carry annotations on delegated property accessors
This commit is contained in:
committed by
Mikhail Glukhikh
parent
f1aa75fdf8
commit
01d852c006
+8
@@ -372,6 +372,7 @@ fun FirPropertyBuilder.generateAccessorsByDelegate(
|
||||
delegate = delegateBuilder.build()
|
||||
if (stubMode) return
|
||||
if (getter == null || getter is FirDefaultPropertyAccessor) {
|
||||
val annotations = getter?.annotations
|
||||
val returnTarget = FirFunctionTarget(null, isLambda = false)
|
||||
getter = buildPropertyAccessor {
|
||||
this.session = session
|
||||
@@ -395,11 +396,15 @@ fun FirPropertyBuilder.generateAccessorsByDelegate(
|
||||
target = returnTarget
|
||||
}
|
||||
)
|
||||
if (annotations != null) {
|
||||
this.annotations.addAll(annotations)
|
||||
}
|
||||
}.also {
|
||||
returnTarget.bind(it)
|
||||
}
|
||||
}
|
||||
if (isVar && (setter == null || setter is FirDefaultPropertyAccessor)) {
|
||||
val annotations = setter?.annotations
|
||||
setter = buildPropertyAccessor {
|
||||
this.session = session
|
||||
origin = FirDeclarationOrigin.Source
|
||||
@@ -436,6 +441,9 @@ fun FirPropertyBuilder.generateAccessorsByDelegate(
|
||||
}
|
||||
}
|
||||
)
|
||||
if (annotations != null) {
|
||||
this.annotations.addAll(annotations)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
// WITH_RUNTIME
|
||||
|
||||
Reference in New Issue
Block a user