From 67aca02a4cf673f1551d22940a722af7c29e1f49 Mon Sep 17 00:00:00 2001 From: Liam Miller-Cushon Date: Mon, 23 Sep 2024 11:58:10 -0700 Subject: [PATCH] Clean up some obsolete error recovery logic in TurbineElement Earlier phases now bind an error type if the super type cannot be resolved, the error recovery here is unnecessary. PiperOrigin-RevId: 677885434 --- .../turbine/processing/TurbineElement.java | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/java/com/google/turbine/processing/TurbineElement.java b/java/com/google/turbine/processing/TurbineElement.java index aa70f1cb..b88ac10f 100644 --- a/java/com/google/turbine/processing/TurbineElement.java +++ b/java/com/google/turbine/processing/TurbineElement.java @@ -50,9 +50,7 @@ import com.google.turbine.model.Const; import com.google.turbine.model.Const.ArrayInitValue; import com.google.turbine.model.TurbineFlag; -import com.google.turbine.tree.Tree; import com.google.turbine.tree.Tree.MethDecl; -import com.google.turbine.tree.Tree.TyDecl; import com.google.turbine.tree.Tree.VarDecl; import com.google.turbine.type.AnnoInfo; import com.google.turbine.type.Type; @@ -266,22 +264,9 @@ public TypeMirror get() { case CLASS: case ENUM: case RECORD: - if (info.superclass() != null) { + if (info.superClassType() != null) { return factory.asTypeMirror(info.superClassType()); } - if (info instanceof SourceTypeBoundClass) { - // support simple names for stuff that doesn't exist - TyDecl decl = ((SourceTypeBoundClass) info).decl(); - if (decl.xtnds().isPresent()) { - ArrayDeque flat = new ArrayDeque<>(); - for (Tree.ClassTy curr = decl.xtnds().get(); - curr != null; - curr = curr.base().orElse(null)) { - flat.addFirst(curr.name()); - } - return factory.asTypeMirror(ErrorTy.create(flat)); - } - } return factory.noType(); case INTERFACE: case ANNOTATION: