Fix access to top-level declarations inside anonymous initializer

#KT-16583 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2017-03-02 13:52:19 +03:00
parent 0e5603f644
commit e2dcec62d3
5 changed files with 55 additions and 2 deletions
@@ -0,0 +1,20 @@
private const val A = 0L
private val B = 0L
private fun sample() = 0L
private class PrivateClass
class Foo {
var bar: Long = 0
private var other: PrivateClass? = null
init {
bar = A
bar = B
bar = sample()
other = PrivateClass()
}
constructor()
}