FIR: introduce separate companion object resolve context
Before this commit, during the resolve of companion objects we used the same context than for any nested class. However, during companion object resolve we should not have companion object receiver itself accessible in any case (in particular, it should not be accessible in constructor). So in this commit we introduced separate context for this purpose.
This commit is contained in:
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
abstract class Base(val fn: () -> String)
|
||||
|
||||
class Host {
|
||||
companion object : Base(run { { Host.ok() } }) {
|
||||
fun ok() = "OK"
|
||||
}
|
||||
}
|
||||
|
||||
fun box() = Host.Companion.fn()
|
||||
Reference in New Issue
Block a user