Fix access to top-level declarations inside anonymous initializer
#KT-16583 Fixed
This commit is contained in:
Vendored
+20
@@ -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()
|
||||
}
|
||||
Reference in New Issue
Block a user