``` suspend fun <T: Event> waitEvent(eve...
# announcements
r
Copy code
suspend fun <T: Event> waitEvent(event: EventDescriptor<T>): T = suspendCoroutine {
        if (waiters.containsKey(it)) {
            waiters[it]?.add(event as EventDescriptor<Event>) // LINE
        }
Hi guys, I'm not understanding why exactly I am getting an unchecked cast on the highlighted line. event is type EventDescriptor<T>, and T: Event, so shouldn't event be castable to EventDescriptor<Event>?