Skip to content

Commit

Permalink
Fix #303
Browse files Browse the repository at this point in the history
  • Loading branch information
gdude2002 committed Jun 17, 2024
1 parent e3da4b8 commit 6278c24
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,28 @@ package com.kotlindiscord.kord.extensions.utils.deltas
import dev.kord.common.entity.optional.Optional
import dev.kord.common.entity.optional.optional
import dev.kord.core.entity.VoiceState
import kotlin.internal.OnlyInputTypes
import kotlin.reflect.KClass
import kotlin.reflect.KProperty

public class ChangeSet(public val clazz: KClass<*>) {
private val changes: MutableMap<KProperty<*>, Change<*>> = mutableMapOf()

@Suppress("UNCHECKED_CAST")
public operator fun <@OnlyInputTypes T : Any?> get(key: KProperty<T>): Change<T> =
public operator fun <
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
@kotlin.internal.OnlyInputTypes
T : Any?,
> get(key: KProperty<T>): Change<T> =

changes[key] as? Change<T>?
?: throw NoSuchElementException("No such element: $key")

public operator fun <@OnlyInputTypes T : Any?> set(
public operator fun <
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
@kotlin.internal.OnlyInputTypes
T : Any?,
> set(

key: KProperty<T>,
value: Change<T>,
) {
Expand Down
16 changes: 0 additions & 16 deletions kord-extensions/src/main/kotlin/kotlin/internal/Annotations.kt

This file was deleted.

0 comments on commit 6278c24

Please sign in to comment.