hello ! just want to know if given a functionDescr...
# compiler
a
hello ! just want to know if given a functionDescriptor can we know if this is a topLevel function or a Function inside a class ?
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
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
👍 1