From c7cde8e7905d0f26fc73b4adf2397ab2807a6b6c Mon Sep 17 00:00:00 2001 From: Him188 Date: Sat, 12 Sep 2020 16:26:12 +0800 Subject: [PATCH] Fix PermissibleIdentifier.allParentsWithSelf --- .../net/mamoe/mirai/console/permission/PermissibleIdentifier.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() }) } } }