hello ! just want to know if given a functionDescriptor can we know if this is a topLevel function or a Function inside a class ?
Akram
10/09/2019, 2:40 PM
I think i have found the solution you just need to check the
function.parents
and verfiyi it has one classDescriptor as a parent
k
kralli
10/09/2019, 2:42 PM
Via `function.containingDeclaration`: If its a top-level function, the containing declaration will be a package fragment and if its a class declaration it will be class descriptor