Skip to content

Commit 6545d02

Browse files
rgrunberdatho7561
andcommitted
Adjust based on javac library updates.
Signed-off-by: Roland Grunberg <[email protected]> Co-Authored-by: David Thompson <[email protected]>
1 parent 7979901 commit 6545d02

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacBindingResolver.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
import com.sun.tools.javac.code.Type.ModuleType;
7575
import com.sun.tools.javac.code.Type.PackageType;
7676
import com.sun.tools.javac.code.Type.TypeVar;
77-
import com.sun.tools.javac.code.Type.UnknownType;
7877
import com.sun.tools.javac.comp.Modules;
7978
import com.sun.tools.javac.tree.JCTree;
8079
import com.sun.tools.javac.tree.TreeInfo;
@@ -731,7 +730,7 @@ ITypeBinding resolveType(RecordDeclaration type) {
731730
ITypeBinding resolveType(TypeDeclaration type) {
732731
resolve();
733732
JCTree javacNode = this.converter.domToJavac.get(type);
734-
if (javacNode instanceof JCClassDecl jcClassDecl && javacNode.type instanceof UnknownType && "<any?>".equals(javacNode.type.toString())) {
733+
if (javacNode instanceof JCClassDecl jcClassDecl && "<any?>".equals(javacNode.type.toString())) {
735734
return new JavacErrorTypeBinding(javacNode.type, javacNode.type.tsym, null, true, JavacBindingResolver.this, jcClassDecl.sym);
736735
}
737736
if (javacNode instanceof JCClassDecl jcClassDecl && jcClassDecl.type != null) {

org.eclipse.jdt.core.javac/src/org/eclipse/jdt/internal/javac/JavacTaskListener.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
import com.sun.tools.javac.code.Type;
5353
import com.sun.tools.javac.code.Type.ArrayType;
5454
import com.sun.tools.javac.code.Type.MethodType;
55-
import com.sun.tools.javac.code.Type.UnknownType;
5655
import com.sun.tools.javac.tree.JCTree.JCClassDecl;
5756
import com.sun.tools.javac.tree.JCTree.JCFieldAccess;
5857
import com.sun.tools.javac.tree.JCTree.JCIdent;
@@ -177,7 +176,7 @@ public Void visitIdentifier(IdentifierTree node, Void p) {
177176
public Void visitMemberSelect(MemberSelectTree node, Void p) {
178177
if (node instanceof JCFieldAccess field) {
179178
if (field.sym != null &&
180-
!(field.type instanceof MethodType || field.type instanceof UnknownType)) {
179+
!(field.type instanceof MethodType || "<any?>".equals(field.type.toString()))) {
181180
recordQualifiedReference(node.toString(), false);
182181
if (field.sym instanceof VarSymbol) {
183182
TypeSymbol elementSymbol = field.type.tsym;

org.eclipse.jdt.core.javac/src/org/eclipse/jdt/internal/javac/dom/JavacTypeBinding.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ static void getKey(StringBuilder builder, Type typeToBuild, String n, boolean is
457457
builder.append(';');
458458
return;
459459
}
460-
if (typeToBuild.hasTag(TypeTag.UNKNOWN)) {
460+
if (typeToBuild.hasTag(TypeTag.NONE)) {
461461
builder.append('*');
462462
return;
463463
}
@@ -596,7 +596,7 @@ public String getBinaryName() {
596596
if (this.type.isPrimitive()) {
597597
// use Javac signature to get correct variable name
598598
StringBuilder res = new StringBuilder();
599-
var generator = new Types.SignatureGenerator(this.types) {
599+
var generator = this.types.new SignatureGenerator() {
600600
@Override
601601
protected void append(char ch) {
602602
res.append(ch);

0 commit comments

Comments
 (0)