From a4d6358e1c381d171a4fdd1b870d32fe56e66fd2 Mon Sep 17 00:00:00 2001 From: Luca Kellermann Date: Sun, 5 Jan 2025 15:21:13 +0100 Subject: [PATCH] Use declaration-site variance for EntitySupplyStrategy This should fix an issue with Kord Extensions [1], and there is generally no reason not to add out in this case. [1] https://discord.com/channels/1121419906995458098/1323320267031838791/1325461220412751883 --- core/api/core.klib.api | 2 +- core/src/commonMain/kotlin/supplier/EntitySupplyStrategy.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/api/core.klib.api b/core/api/core.klib.api index db4577ec60c6..a874286446ef 100644 --- a/core/api/core.klib.api +++ b/core/api/core.klib.api @@ -6,7 +6,7 @@ // - Show declarations: true // Library unique name: -abstract interface <#A: dev.kord.core.supplier/EntitySupplier> dev.kord.core.supplier/EntitySupplyStrategy { // dev.kord.core.supplier/EntitySupplyStrategy|null[0] +abstract interface <#A: out dev.kord.core.supplier/EntitySupplier> dev.kord.core.supplier/EntitySupplyStrategy { // dev.kord.core.supplier/EntitySupplyStrategy|null[0] abstract fun supply(dev.kord.core/Kord): #A // dev.kord.core.supplier/EntitySupplyStrategy.supply|supply(dev.kord.core.Kord){}[0] final object Companion { // dev.kord.core.supplier/EntitySupplyStrategy.Companion|null[0] diff --git a/core/src/commonMain/kotlin/supplier/EntitySupplyStrategy.kt b/core/src/commonMain/kotlin/supplier/EntitySupplyStrategy.kt index f7f6b6313db8..95a301792546 100644 --- a/core/src/commonMain/kotlin/supplier/EntitySupplyStrategy.kt +++ b/core/src/commonMain/kotlin/supplier/EntitySupplyStrategy.kt @@ -6,7 +6,7 @@ import dev.kord.core.supplier.EntitySupplyStrategy.Companion.cache /** * A supplier that accepts a [Kord] instance and returns an [EntitySupplier] of type [T]. */ -public interface EntitySupplyStrategy { +public interface EntitySupplyStrategy { /** * Returns an [EntitySupplier] of type [T] that operates on the [kord] instance.