Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properties from companion object are not parsed as KlassDeclaration instances #38

Open
mbolotov opened this issue May 11, 2021 · 1 comment
Assignees
Labels
bug Something isn't working feedback waiting for feedback fixed

Comments

@mbolotov
Copy link

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:
image

Is this the expected behavior?

drieks added a commit that referenced this issue May 11, 2021
drieks added a commit that referenced this issue May 11, 2021
drieks added a commit that referenced this issue May 11, 2021
@drieks
Copy link
Collaborator

drieks commented May 11, 2021

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

@drieks drieks self-assigned this May 11, 2021
@drieks drieks added bug Something isn't working feedback waiting for feedback fixed labels May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feedback waiting for feedback fixed
Projects
None yet
Development

No branches or pull requests

2 participants