Hi folks, is there a way to get furthest parent Kt...
# compiler
h
Hi folks, is there a way to get furthest parent KtClassOrObject from KtClassOrObject?
s
You can get list of all parents of type (there's an extension, don't remember the exact name) and you can take the last one which would be the outermost
h
­čĄö
s
Something like:
Copy code
declaration.parents.filterIsInstance<KtClassOrObject>().last()