mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-04-18 00:21:29 +00:00
FIR: set anonymous initializers' parents
This commit is contained in:
@@ -411,6 +411,7 @@ class Fir2IrVisitor(
|
||||
symbolTable.declareAnonymousInitializer(
|
||||
startOffset, endOffset, origin, parent.descriptor
|
||||
).apply {
|
||||
setParentByParentStack()
|
||||
declarationStorage.enterScope(descriptor)
|
||||
body = anonymousInitializer.body!!.convertToIrBlockBody()
|
||||
declarationStorage.leaveScope(descriptor)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm
|
||||
// WITH_RUNTIME
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: NATIVE
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
var global = 0;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
class C() {
|
||||
public var f: Int
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
class Reluctant() {
|
||||
init {
|
||||
throw Exception("I'm not coming out")
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
fun foo(x: Int = 42) = x
|
||||
|
||||
class C {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
object Foo {
|
||||
val bar: String
|
||||
|
||||
|
||||
Reference in New Issue
Block a user