KT-30780 Fix erased inline class context in class context hierarchy
In SourceCompilerForInline we could enter ERASED_INLINE_CLASS context from containing declaration context. That broke codegen context hierarchy invariants assumed in accessor generation.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class Test(val x: Int) {
|
||||
private companion object {
|
||||
private const val CONSTANT = "OK"
|
||||
}
|
||||
|
||||
fun crash() = getInlineConstant()
|
||||
|
||||
private inline fun getInlineConstant(): String {
|
||||
return CONSTANT
|
||||
}
|
||||
}
|
||||
|
||||
fun box() = Test(1).crash()
|
||||
Reference in New Issue
Block a user