Problems resolving a NameExpr when it represents a private field name #2367
Labels
Question (JP usage)
How to use JP to inspect/modify the AST - please close your question once answered!
Symbol Solver
Milestone
Hello,
I am having problems with
((NameExpr) node).resolve().getType().describe()
when the node represents the name of a private field.
An exception is thrown at the
resolve()
call. I think the problem comes from class com.github.javaparser.symbolsolver.javaparsermodel.contexts.ClassOrInterfaceDeclarationContext, at the method:I don't understand why it is only searching for visible fields, being the ClassOrInterfaceDeclaration a parent of my NameExpr node.
Should I do this in other way?
The text was updated successfully, but these errors were encountered: