From ed34fba393fb929ea9898d52404c00c91a5f79ab Mon Sep 17 00:00:00 2001 From: Rob Stryker Date: Wed, 22 May 2024 16:09:22 -0400 Subject: [PATCH] Fix test0027 in ASTConverter15JLS8Test Signed-off-by: Rob Stryker --- .../eclipse/jdt/core/dom/JavacBindingResolver.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacBindingResolver.java b/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacBindingResolver.java index 1b0f8a38cae..ec6be77d752 100644 --- a/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacBindingResolver.java +++ b/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacBindingResolver.java @@ -469,6 +469,17 @@ IBinding resolveNameToJavac(Name name, JCTree tree) { return null; } + IVariableBinding resolveVariable(EnumConstantDeclaration enumConstant) { + resolve(); + Object o = this.converter.domToJavac.get(enumConstant); + if (o instanceof JCVariableDecl decl) { + if (!decl.type.isErroneous() || this.isRecoveringBindings) { + return canonicalize(new JavacVariableBinding(decl.sym, this)); + } + } + return null; + } + @Override IVariableBinding resolveVariable(EnumConstantDeclaration enumConstant) { resolve();