diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermissibleIdentifier.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermissibleIdentifier.kt index 6db38f796..515b59164 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermissibleIdentifier.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermissibleIdentifier.kt @@ -32,7 +32,7 @@ public interface PermissibleIdentifier { private fun PermissibleIdentifier.allParentsWithSelf(): Sequence { return sequence { yield(this@allParentsWithSelf) - yieldAll(parents.asSequence()) + yieldAll(parents.asSequence().flatMap { it.allParentsWithSelf() }) } } }