From 0c77de304935a4365317a5dddc27aafe28a55669 Mon Sep 17 00:00:00 2001 From: Nikolay Lunyak Date: Mon, 6 Mar 2023 10:35:18 +0200 Subject: [PATCH] [FIR] Add a test with an inapplicable receiver annotation --- compiler/testData/diagnostics/tests/kt56769.fir.kt | 5 +++++ compiler/testData/diagnostics/tests/kt56769.kt | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/compiler/testData/diagnostics/tests/kt56769.fir.kt b/compiler/testData/diagnostics/tests/kt56769.fir.kt index 3e16dd4717f..a525a7703c7 100644 --- a/compiler/testData/diagnostics/tests/kt56769.fir.kt +++ b/compiler/testData/diagnostics/tests/kt56769.fir.kt @@ -17,3 +17,8 @@ fun @receiver:Anno Int.drain() {} fun @file:Anno Int.brain() {} fun (@Anno Int).crane() {} + +@Target(AnnotationTarget.FILE) +annotation class Anno2 + +fun @receiver:Anno2 Int.pain() {} diff --git a/compiler/testData/diagnostics/tests/kt56769.kt b/compiler/testData/diagnostics/tests/kt56769.kt index da07e1a3a97..d89ac554cde 100644 --- a/compiler/testData/diagnostics/tests/kt56769.kt +++ b/compiler/testData/diagnostics/tests/kt56769.kt @@ -17,3 +17,8 @@ fun @receiver:Anno Int.drain() {} fun @file:Anno Int.brain() {} fun (@Anno Int).crane() {} + +@Target(AnnotationTarget.FILE) +annotation class Anno2 + +fun @receiver:Anno2 Int.pain() {}