Skip to content

Commit

Permalink
Use declaration-site variance for EntitySupplyStrategy (#996)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lukellmann authored Jan 13, 2025
1 parent 446d30c commit 3797f27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/api/core.klib.api
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// - Show declarations: true

// Library unique name: <kord:core>
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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<T : EntitySupplier> {
public interface EntitySupplyStrategy<out T : EntitySupplier> {

/**
* Returns an [EntitySupplier] of type [T] that operates on the [kord] instance.
Expand Down

0 comments on commit 3797f27

Please sign in to comment.