Cover KT-60646 with regression tests

This behavior wasn't intended during KT-15470 coding. I only intended to
prohibit `@get:` target on things different from properties. But I
accidentally prohibited `@property` on things different from properties
too

But it's a bug fix anyway, so let's keep it.

I also re-checked the implementation of KT-15470, I don't see any other
unintentional prohibitions
This commit is contained in:
Nikita Bobko
2023-08-22 16:39:39 +02:00
committed by Space Team
parent 7e4f9def83
commit c42d19f0e5
7 changed files with 78 additions and 0 deletions
@@ -0,0 +1,9 @@
// FIR_IDENTICAL
// !LANGUAGE: +ProhibitUseSiteGetTargetAnnotations
@Target(AnnotationTarget.PROPERTY) annotation class Annotation
enum class Foo {
<!INAPPLICABLE_TARGET_ON_PROPERTY!>@property:Annotation<!>
Entry
}
@@ -0,0 +1,9 @@
// FIR_IDENTICAL
// !LANGUAGE: -ProhibitUseSiteGetTargetAnnotations
@Target(AnnotationTarget.PROPERTY) annotation class Annotation
enum class Foo {
<!INAPPLICABLE_TARGET_ON_PROPERTY_WARNING!>@property:Annotation<!>
Entry
}