Another question is how to get all the declared de...
# compiler
c
Another question is how to get all the declared descriptors in the
ClassDescriptor
? I found this usage: https://github.com/JetBrains/kotlin/blob/1.6.0/plugins/kotlin-serialization/kotlin[…]otlinx/serialization/compiler/resolve/SerializableProperties.kt, but I can’t use it, an error will be thrown when I try to use the same code:
Copy code
e: java.lang.AssertionError: Recursion detected on input: actualType under LockBasedStorageManager@30057fbe (TopDownAnalyzer for JVM)
	at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.getContributedVariables(AbstractLazyMemberScope.kt:139)
	at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.getContributedVariables(LazyClassMemberScope.kt:395)
	at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.computeDescriptorsFromDeclaredElements(AbstractLazyMemberScope.kt:234)
	at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.doDescriptors(LazyClassMemberScope.kt:68)
	at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.access$doDescriptors(LazyClassMemberScope.kt:52)
	at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope$allDescriptors$1.invoke(LazyClassMemberScope.kt:64)
d
Am I right that you try to compute all members (including synthetics) of some class during process of generating synthetics of the this class?
c
Yes, that’s what I’m doing, but in fact, I only care about manually declared members
d
😫 1