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()
|
||||
}
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
package
|
||||
|
||||
private const val A: kotlin.Long = 0.toLong()
|
||||
private val B: kotlin.Long = 0.toLong()
|
||||
private fun sample(): kotlin.Long
|
||||
|
||||
public final class Foo {
|
||||
public constructor Foo()
|
||||
public final var bar: kotlin.Long
|
||||
private final var other: PrivateClass?
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
private final class PrivateClass {
|
||||
public constructor PrivateClass()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user