ast
ast copied to clipboard
Properties from companion object are not parsed as KlassDeclaration instances
Given the following code:
class MyClass {
val myClassProp = "myClassProp"
companion object {
const val myCompanionConst = "myCompanionConst"
val myCompanionProp = "myCompanionProp"
}
}
the parser returns myConst and myClassProp as a KlassDeclaration instances, but the myCompanionProp is parsed as a tree of DefaultAstNode/DefaultAstTerminal which are hard to analyze:

Is this the expected behavior?
Hi @mbolotov,
thank you for reporting! The recursive tree parsing call for companion objects was missing, it should be working now.
Please try version 6e557bc3ba