parents

fun FqName.parents(): Sequence<FqName>

Generates a sequence of FqName starting from the current FqName and including its parents up to the root. The sequence will not include the current FqName.