Skip to content

Conversation

mpollmeier
Copy link
Contributor

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...

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 mpollmeier requested review from fabsx00 and ml86 May 12, 2023 19:55
@mpollmeier
Copy link
Contributor Author

thanks @prabhu for bringing this up

@DavidBakerEffendi DavidBakerEffendi added bug Something isn't working compatibility Concerns fixing either upstream or downstream compatibility labels Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working compatibility Concerns fixing either upstream or downstream compatibility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants