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

AstNode.astParent is not set for ast root - mark that in return type #2712

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on May 12, 2023

  1. AstNode.astParent is not set for ast root - mark that in return type

    the ast root doesn't have a parent:
    ```
    cpg.method.head.astParent.astParent.astParent.astParent.astParent
    
    java.util.NoSuchElementException
      at io.shiftleft.Implicits$JavaIteratorDeco$.onlyChecked$extension(Implicits.scala:43)
      at io.shiftleft.semanticcpg.language.nodemethods.AstNodeMethods$.astParent$extension(AstNodeMethods.scala:69)
      ... 39 elided
    ```
    
    n.b. this isn't quite mergeable yet - I'll adapt downstream usage after
    hearing your feedback...
    mpollmeier committed May 12, 2023
    Configuration menu
    Copy the full SHA
    f6d9914 View commit details
    Browse the repository at this point in the history