FIR: set anonymous initializers' parents

This commit is contained in:
pyos
2019-11-21 13:25:16 +01:00
committed by Dmitriy Novozhilov
parent b38153e402
commit 57760e5873
7 changed files with 1 additions and 6 deletions

View File

@@ -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)

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm
// WITH_RUNTIME

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: JS_IR
var global = 0;

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class C() {
public var f: Int

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class Reluctant() {
init {
throw Exception("I'm not coming out")

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun foo(x: Int = 42) = x
class C {

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
object Foo {
val bar: String