Files
kotlin-fork/backend.native
Igor Chevdar db50381bc9 Inline: set correct containing declaration + some fixes
1. Containing declaration can be computed as parent from the IR.

2. Sometimes we need to substitute FunctionDescriptor which is defined
inside an inline function call but nevertheless leaks to the outside:

public inline fun <T, R> T.myLet(f: (T) -> R): R = f(this)

interface foo {
    fun bar(): String
}

fun box(): String {
    val baz = "OK".myLet {
        object : foo {
            override fun bar() = it
        }
    }
    return baz.bar()
}
2017-04-07 08:01:16 +07:00
..
2017-03-30 09:51:58 +03:00