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?Javier
08/03/2022, 11:15 PMdenis.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_LISTJavier
08/04/2022, 10:16 AM<T> and they are thereJavier
08/04/2022, 10:18 AM<T>, it is appearing there too as third elementdenis.zharkov
08/04/2022, 10:19 AMorg.jetbrains.kotlin.parsing.KotlinParsing#parseContextReceiverListJavier
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 🤔Javier
08/04/2022, 10:32 AMJavier
08/04/2022, 10:33 AMJavier
08/04/2022, 10:33 AMdenis.zharkov
08/04/2022, 10:33 AMJavier
08/04/2022, 10:34 AMJavier
08/04/2022, 10:38 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 methodJavier
08/04/2022, 10:51 AM