https://kotlinlang.org logo
#eap
Title
# eap
f

Franklin

02/20/2023, 2:22 AM
Hey I'm trying out context receivers. Works fine in my projects. I just started using them with annotations though. I see the KEEP says
As a matter of coding style, context receivers are defined after annotations and before other modifiers on a separate line.
https://github.com/Kotlin/KEEP/blob/master/proposals/context-receivers.md#detailed-design But when I try
Copy code
class A

@Deprecated(message = "")
context(A)
fun Method() {}
It raises an error during compilation
Expecting a top level declaration
. I have to swap the order around and declare
context
first then the annotation. On Kotlin 1.8.0 Is it just me? should I raise this as a bug on Youtrack?
🙏 1
👍 1
f

Franklin

02/20/2023, 2:47 AM
Ah thanks 🙂
7 Views