mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-13 06:30:13 +08:00
Add out
variance to generic type of ContactList
This commit is contained in:
parent
dad2d965ab
commit
03a18724fe
@ -21,11 +21,9 @@ import java.util.concurrent.ConcurrentLinkedQueue
|
||||
* @see ContactList.asSequence
|
||||
*/
|
||||
@Suppress("unused")
|
||||
public class ContactList<C : Contact>
|
||||
@MiraiInternalApi public constructor(@JvmField @MiraiInternalApi public val delegate: ConcurrentLinkedQueue<C>) :
|
||||
public class ContactList<out C : Contact>
|
||||
@MiraiInternalApi public constructor(@JvmField @MiraiInternalApi public val delegate: MutableCollection<@UnsafeVariance C>) :
|
||||
Collection<C> by delegate {
|
||||
@MiraiInternalApi
|
||||
public constructor(collection: Collection<C>) : this(ConcurrentLinkedQueue(collection))
|
||||
|
||||
@MiraiInternalApi
|
||||
public constructor() : this(ConcurrentLinkedQueue())
|
||||
|
Loading…
Reference in New Issue
Block a user