From 080cdd262c16c552ad29413333f4f75bc9b11aec Mon Sep 17 00:00:00 2001 From: Rob Stryker Date: Fri, 3 May 2024 01:48:10 -0400 Subject: [PATCH] Partial fix for ASTConverter15JLS8Test.test0046 - missing superclass Signed-off-by: Rob Stryker --- .../src/org/eclipse/jdt/core/dom/JavacConverter.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java b/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java index 47150ea8436..a7831ce9107 100644 --- a/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java +++ b/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java @@ -407,11 +407,9 @@ private AbstractTypeDeclaration convertClassDecl(JCClassDecl javacClassDecl, AST typeDeclaration.setSuperclassType(convertToType(javacClassDecl.getExtendsClause())); } else { JCExpression e = javacClassDecl.getExtendsClause(); - if( e instanceof JCFieldAccess jcfa) { - String pack = jcfa.selected == null ? null : jcfa.selected.toString(); - typeDeclaration.setSuperclass(convert(jcfa.name, pack)); - } else if( e instanceof JCIdent jcid) { - typeDeclaration.setSuperclass(convert(jcid.name, null)); + Name m = toName(e); + if( m != null ) { + typeDeclaration.setSuperclass(m); } } }