K2: add reproducer for KT-54275
This commit is contained in:
committed by
Space Team
parent
7f6bd2ab1e
commit
d491eba629
+31
@@ -0,0 +1,31 @@
|
||||
FILE: exceptionInRepeatedAnnotation.kt
|
||||
public final typealias EventHandler<E> = R|(@R|kotlin/ParameterName|(name = String(e)) E) -> kotlin/Unit|
|
||||
public final class EventListener<E : R|Event|> : R|kotlin/Any| {
|
||||
public constructor<E : R|Event|>(): R|EventListener<E>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final companion object Companion : R|kotlin/Any| {
|
||||
private constructor(): R|EventListener.Companion| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final inline operator fun <reified E : R|Event|> invoke(noinline callback: R|EventHandler<E>|): R|EventListener<E>| {
|
||||
^invoke R|kotlin/TODO|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public final inline fun <reified E : R|Event|> R|EventHandler<E>|.withPriority(): R|EventListener<@R|kotlin/ParameterName|(name = String(e)) E>| {
|
||||
^withPriority Q|EventListener|.R|/EventListener.Companion.invoke|<R|@R|kotlin/ParameterName|(name = String(e)) E|>(this@R|/withPriority|)
|
||||
}
|
||||
public final inline fun <reified E : R|Event|> R|EventHandler<E>|.withDefaultPriority(): R|EventListener<@R|kotlin/ParameterName|(name = String(e)) @R|kotlin/ParameterName|(name = String(e)) E>| {
|
||||
^withDefaultPriority this@R|/withDefaultPriority|.R|/withPriority|<R|@R|kotlin/ParameterName|(name = String(e)) E|>()
|
||||
}
|
||||
public abstract class Event : R|kotlin/Any| {
|
||||
public constructor(): R|Event| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
typealias EventHandler<E> = (e: E) -> Unit
|
||||
|
||||
class EventListener<E: Event>() {
|
||||
|
||||
companion object {
|
||||
|
||||
inline operator fun <reified E: Event> invoke(
|
||||
noinline callback: EventHandler<E>,
|
||||
): EventListener<E> = TODO()
|
||||
}
|
||||
}
|
||||
|
||||
inline fun <reified E: Event> EventHandler<E>.withPriority() = EventListener(this)
|
||||
|
||||
inline fun <reified E: Event> EventHandler<E>.withDefaultPriority() = withPriority()
|
||||
|
||||
abstract class Event
|
||||
Reference in New Issue
Block a user