Files
kotlin-fork/compiler/testData/ir/irText/declarations/kt52677.fir.kt.txt
T
Sergej Jaskiewicz aa1b18b0c8 [IR] Prevent infinite recursion when rendering bound symbol references
Refactor the renderer, make BoundSymbolReferenceRenderer a static class
to prevent calling RenderIrElementVisitor's methods from it to avoid
infinite recursion in the future.

^KT-52677 Fixed
2022-11-28 16:43:53 +00:00

88 lines
1.8 KiB
Plaintext
Vendored

typealias Uuid = @MySerializable(c = UuidSerializer::class) Uuid1
@Target(allowedTargets = [AnnotationTarget.TYPE])
open annotation class MySerializable : Annotation {
constructor(c: KClass<*>) /* primary */ {
super/*Any*/()
/* <init>() */
}
val c: KClass<*>
field = c
get
}
data class LoginSuccessPacket {
constructor(id: @MySerializable(c = UuidSerializer::class) Uuid1) /* primary */ {
super/*Any*/()
/* <init>() */
}
val id: @MySerializable(c = UuidSerializer::class) Uuid1
field = id
get
operator fun component1(): @MySerializable(c = UuidSerializer::class) Uuid1 {
return <this>.#id
}
fun copy(id: @MySerializable(c = UuidSerializer::class) Uuid1 = <this>.#id): LoginSuccessPacket {
return LoginSuccessPacket(id = id)
}
override fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
}
when {
other !is LoginSuccessPacket -> return false
}
val tmp0_other_with_cast: LoginSuccessPacket = other as LoginSuccessPacket
when {
EQEQ(arg0 = <this>.#id, arg1 = tmp0_other_with_cast.#id).not() -> return false
}
return true
}
override fun hashCode(): Int {
return <this>.#id.hashCode()
}
override fun toString(): String {
return "LoginSuccessPacket(" + "id=" + <this>.#id + ")"
}
}
interface MySerializer<T : Any?> {
}
object UuidSerializer : MySerializer<@MySerializable(c = UuidSerializer::class) Uuid1> {
private constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
class Uuid1 {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
fun foo(): @MySerializable(c = UuidSerializer::class) Uuid1 {
throw RuntimeException()
}
fun bar(): @MySerializable(c = UuidSerializer::class) Uuid1 {
return foo()
}