Don't infix for grantedWith

This commit is contained in:
Him188 2020-09-09 21:41:20 +08:00
parent 8661627607
commit 8d115cd954
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ public abstract class AbstractConcurrentPermissionService<P : Permission> : Perm
val granted =
if (permissibleIdentifiers.isEmpty()) false
else permissibleIdentifiers.any { permissibleIdentifier grantedWith it }
else permissibleIdentifiers.any { permissibleIdentifier.grantedWith(it) }
if (granted) get(permissionIdentifier)?.let { yield(it) }
}

View File

@ -17,7 +17,7 @@ public interface PermissibleIdentifier {
public companion object {
@ExperimentalPermission
public infix fun PermissibleIdentifier.grantedWith(with: PermissibleIdentifier): Boolean {
public fun PermissibleIdentifier.grantedWith(with: PermissibleIdentifier): Boolean {
return allParentsWithSelf().any { it == with }
}