mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 00:21:29 +00:00
The comment in the code is correct that EnclosingMethod attributes should only be generated for local and anonymous classes. We were generating them for member classes as well which leads to invalid class files. With this change I had to mute one more tests. That is because we lose the parent method and therefore we see a class as a member class instead of a local class. With the old descriptor based check that test still passes.
27 lines
373 B
Kotlin
Vendored
27 lines
373 B
Kotlin
Vendored
package test
|
|
|
|
class WithClassObject {
|
|
companion object {
|
|
fun foo() {}
|
|
|
|
val value: Int = 0
|
|
val valueWithGetter: Int
|
|
get() = 1
|
|
|
|
var variable: Int = 0
|
|
var variableWithAccessors: Int
|
|
get() = 0
|
|
set(v) {}
|
|
|
|
}
|
|
|
|
class MyInner {
|
|
fun foo() {}
|
|
val value: Int = 0
|
|
}
|
|
}
|
|
|
|
object PackageInner {
|
|
fun foo() {}
|
|
val value: Int = 0
|
|
} |