Move fields and init blocks of companions to their owners

This commit is contained in:
Georgy Bronnikov
2018-07-19 18:14:58 +03:00
parent 827494abbe
commit 605afbae90
42 changed files with 567 additions and 176 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
object O {
val mmmap = HashMap<String, Int>();
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
object A {
val a = "OK"
val b = A.a
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
class A(val result: String)
fun a(body: A.() -> String): String {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
interface T
object Foo {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
class Test {
companion object {
fun ok() = "OK"
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
object Test {
fun ok() = "OK"
val x = run { Test.ok() }