Skip to content

Commit 67aca02

Browse files
cushonJavac Team
authored andcommitted
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
1 parent f67d011 commit 67aca02

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

java/com/google/turbine/processing/TurbineElement.java

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@
5050
import com.google.turbine.model.Const;
5151
import com.google.turbine.model.Const.ArrayInitValue;
5252
import com.google.turbine.model.TurbineFlag;
53-
import com.google.turbine.tree.Tree;
5453
import com.google.turbine.tree.Tree.MethDecl;
55-
import com.google.turbine.tree.Tree.TyDecl;
5654
import com.google.turbine.tree.Tree.VarDecl;
5755
import com.google.turbine.type.AnnoInfo;
5856
import com.google.turbine.type.Type;
@@ -266,22 +264,9 @@ public TypeMirror get() {
266264
case CLASS:
267265
case ENUM:
268266
case RECORD:
269-
if (info.superclass() != null) {
267+
if (info.superClassType() != null) {
270268
return factory.asTypeMirror(info.superClassType());
271269
}
272-
if (info instanceof SourceTypeBoundClass) {
273-
// support simple names for stuff that doesn't exist
274-
TyDecl decl = ((SourceTypeBoundClass) info).decl();
275-
if (decl.xtnds().isPresent()) {
276-
ArrayDeque<Tree.Ident> flat = new ArrayDeque<>();
277-
for (Tree.ClassTy curr = decl.xtnds().get();
278-
curr != null;
279-
curr = curr.base().orElse(null)) {
280-
flat.addFirst(curr.name());
281-
}
282-
return factory.asTypeMirror(ErrorTy.create(flat));
283-
}
284-
}
285270
return factory.noType();
286271
case INTERFACE:
287272
case ANNOTATION:

0 commit comments

Comments
 (0)