Skip to content

[core] Conflicting contracts of getChild between PMD & Antlr #2235

@oowekyala

Description

@oowekyala

The contract of Node::getChild (#2172) is to throw when the index is out of bounds. Antlr parse trees also happen to have a getChild method whose contract is to return null in this case. Should we align ourselves? I think it's reasonable, though this needs to be pointed out in the release notes, as it's a noticeable departure from the current status quo

Metadata

Metadata

Assignees

No one assigned

    Labels

    in:astAbout the AST structure or API, the parsing step

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions