[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
This commit is contained in:
committed by
Space Team
parent
9fcd185141
commit
aa1b18b0c8
+26
@@ -0,0 +1,26 @@
|
||||
// ISSUE: KT-52677
|
||||
|
||||
// MODULE: lib
|
||||
// FILE: lib.kt
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class MySerializable(val c: kotlin.reflect.KClass<*>)
|
||||
|
||||
public data class LoginSuccessPacket(val id: Uuid)
|
||||
|
||||
public typealias Uuid = @MySerializable(UuidSerializer::class) Uuid1
|
||||
|
||||
interface MySerializer<T>
|
||||
public object UuidSerializer : MySerializer<Uuid>
|
||||
public class Uuid1 {
|
||||
fun ok() = "OK"
|
||||
}
|
||||
|
||||
// MODULE: main(lib)
|
||||
// FILE: main.kt
|
||||
|
||||
fun foo(): Uuid { throw RuntimeException() }
|
||||
|
||||
fun bar() = foo()
|
||||
|
||||
fun box() = LoginSuccessPacket(Uuid()).id.ok()
|
||||
Reference in New Issue
Block a user