KT-43205 Ignore annotations in CallableClsStubBuilder when needed
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
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// IntelliJ API Decompiler stub source generated from a class file
|
||||
// Implementation of methods is not available
|
||||
|
||||
package test
|
||||
|
||||
public final class PrivateConstField public constructor() {
|
||||
private companion object {
|
||||
public const final val CONST: kotlin.Int /* compiled code */
|
||||
|
||||
@test.A @field:java.lang.Deprecated public const final val CONST_WITH_ANNOTATION: kotlin.Int /* compiled code */
|
||||
|
||||
public final val field: kotlin.Int /* compiled code */
|
||||
|
||||
@test.A @field:java.lang.Deprecated public final val fieldWithAnnotation: kotlin.Int /* compiled code */
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user