Skip to content

Commit

Permalink
Update call site for javac signature change (#817)
Browse files Browse the repository at this point in the history
  • Loading branch information
cushon authored Jul 21, 2024
1 parent 77d2f89 commit 498e315
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,13 @@ public Env<AttrContext> getEnvForPath(TreePath path) {
try {
Env<AttrContext> env = getEnvForPath(path);
// Either a VariableElement or a SymbolNotFoundError.
Element res = wrapInvocationOnResolveInstance(FIND_VAR, env, names.fromString(name));
Element res;
if (atLeastJava24) {
DiagnosticPosition pos = (DiagnosticPosition) path.getLeaf();
res = wrapInvocationOnResolveInstance(FIND_VAR, pos, env, names.fromString(name));
} else {
res = wrapInvocationOnResolveInstance(FIND_VAR, env, names.fromString(name));
}
// Every kind in the documentation of Element.getKind() is explicitly tested, possibly
// in the "default:" case.
switch (res.getKind()) {
Expand Down

0 comments on commit 498e315

Please sign in to comment.