Javier
08/03/2022, 11:09 PMfunction.contextReceivers
where function
is KtNamedFunction
with Kotlin 1.7.10. Is there any way to get the list of context receivers?denis.zharkov
08/04/2022, 7:48 AMJavier
08/04/2022, 8:08 AMdenis.zharkov
08/04/2022, 9:21 AMmaybe the problem is I need to enable context receivers in testsFor that, actually you don’t need to enable anything in the test I would assume, there are just no context receivers on the
function
, probably it’s the wrong instance or something like thatJavier
08/04/2022, 10:13 AMdenis.zharkov
08/04/2022, 10:16 AMfunction
actually have
Like does it have a CONTEXT_RECEIVER_LIST
Javier
08/04/2022, 10:16 AM<T>
and they are there<T>
, it is appearing there too as third elementdenis.zharkov
08/04/2022, 10:19 AMorg.jetbrains.kotlin.parsing.KotlinParsing#parseContextReceiverList
Javier
08/04/2022, 10:20 AMdenis.zharkov
08/04/2022, 10:21 AMparseTopLevelDeclaration
?
At the
if (at(CONTEXT_KEYWORD)) {
parseContextReceiverList();
}
Javier
08/04/2022, 10:27 AMif
🤔denis.zharkov
08/04/2022, 10:33 AMJavier
08/04/2022, 10:34 AMdenis.zharkov
08/04/2022, 10:43 AMorg.jetbrains.kotlin.parsing.KotlinParsing
used at runtime is really up-to-date (i.e., it actually has parseContextReceiverList
method) or somehow figure out how to debug it properly.Javier
08/04/2022, 10:47 AMparseFile
method