Skip to content

Commit

Permalink
Fix test0027 in ASTConverter15JLS8Test
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Stryker <stryker@redhat.com>
  • Loading branch information
Rob Stryker authored and mickaelistria committed May 29, 2024
1 parent 54e6a40 commit 0fdefef
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,17 @@ IBinding resolveNameToJavac(Name name, JCTree tree) {
return null;
}

@Override
IVariableBinding resolveVariable(EnumConstantDeclaration enumConstant) {
resolve();
if (this.converter.domToJavac.get(enumConstant) instanceof JCVariableDecl decl) {
if (!decl.type.isErroneous() || this.isRecoveringBindings) {
return this.bindings.getVariableBinding(decl.sym);
}
}
return null;
}

@Override
IVariableBinding resolveVariable(VariableDeclaration variable) {
resolve();
Expand Down

0 comments on commit 0fdefef

Please sign in to comment.