93ba0c3e70
Note that there's no code that checks that FirReceiverParameter's annotation's use-site target is indeed `@receiver:`, because otherwise the annotation wouldn't have made it into the FirReceiverParameter. In contrast, in K1 all such annotations are treated as annotations on a KtTypeReference. ^KT-56769 Fixed
11 lines
457 B
Kotlin
Vendored
11 lines
457 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
// !LANGUAGE: +RestrictionOfWrongAnnotationsWithUseSiteTargetsOnTypes
|
|
|
|
@Target(AnnotationTarget.VALUE_PARAMETER)
|
|
annotation class Fancy
|
|
|
|
fun @receiver:Fancy String.myExtension() { }
|
|
val @receiver:Fancy Int.asVal get() = 0
|
|
|
|
fun ((<!WRONG_ANNOTATION_TARGET_WITH_USE_SITE_TARGET!>@receiver:Fancy<!> Int) -> Unit).complexReceiver1() {}
|
|
fun ((Int) -> <!WRONG_ANNOTATION_TARGET_WITH_USE_SITE_TARGET!>@receiver:Fancy<!> Unit).complexReceiver2() {} |