ebfbc2f601
Kotlin compiler can add `@Deprecated` annotations to the fields of private companion objects, and if those annotations are not supposed to be shown in decompiled code and used, the field is marked with `HAS_ANNOTATIONS=false` flag (see KT-25009) However, it was not taken into account in stubs building process, which led to the 'Stubs vs PSI mismatch' exceptions ^KT-43205 Fixed Also, restore the order of nested typealiases and classes (see KT-41859) We didn't want to bump the version of the stubs when we fixed this issue; now we have an opportunity to restore the order back to match the `MemberComparator` Also, some refactoring is done to underscore that `createPackageDeclarationsStubs` is suitable only for packages, not for any declarations container
16 lines
315 B
Kotlin
Vendored
16 lines
315 B
Kotlin
Vendored
package test
|
|
|
|
@Retention(AnnotationRetention.RUNTIME)
|
|
annotation class A
|
|
|
|
class PrivateConstField {
|
|
private companion object {
|
|
const val CONST: Int = 10
|
|
@A
|
|
const val CONST_WITH_ANNOTATION: Int = 10
|
|
|
|
val field: Int = 10
|
|
@A
|
|
val fieldWithAnnotation: Int = 10
|
|
}
|
|
} |