Native: fix target for ReturnsRetained and ConsumesReceiver annotations

These annotations can be used on Objective-C property accessors imported
to Kotlin.
Note: the annotations aren't used in source code, only generated
directly to metadata by cinterop. So this commit doesn't in fact fix
anything but rather makes the implementation less fragile.

See https://github.com/JetBrains/kotlin-native/issues/3336.
This commit is contained in:
Svyatoslav Scherbina
2021-03-30 20:23:59 +00:00
committed by Space
parent 107129679e
commit 1d96f810da
@@ -40,11 +40,19 @@ public annotation class CCall(val id: String) {
@Retention(AnnotationRetention.BINARY)
annotation class WCString
@Target(AnnotationTarget.FUNCTION)
@Target(
AnnotationTarget.FUNCTION,
AnnotationTarget.PROPERTY_GETTER,
AnnotationTarget.PROPERTY_SETTER
)
@Retention(AnnotationRetention.BINARY)
annotation class ReturnsRetained
@Target(AnnotationTarget.FUNCTION)
@Target(
AnnotationTarget.FUNCTION,
AnnotationTarget.PROPERTY_GETTER,
AnnotationTarget.PROPERTY_SETTER
)
@Retention(AnnotationRetention.BINARY)
annotation class ConsumesReceiver