langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java
changeset 42828 cce89649f958
parent 42827 36468b5fa7f4
child 44186 fe848a208b20
equal deleted inserted replaced
42827:36468b5fa7f4 42828:cce89649f958
  1162     }
  1162     }
  1163 
  1163 
  1164     public static class ErasedClassType extends ClassType {
  1164     public static class ErasedClassType extends ClassType {
  1165         public ErasedClassType(Type outer, TypeSymbol tsym,
  1165         public ErasedClassType(Type outer, TypeSymbol tsym,
  1166                                TypeMetadata metadata) {
  1166                                TypeMetadata metadata) {
  1167             super(outer, List.<Type>nil(), tsym, metadata);
  1167             super(outer, List.nil(), tsym, metadata);
  1168         }
  1168         }
  1169 
  1169 
  1170         @Override
  1170         @Override
  1171         public boolean hasErasedSupertypes() {
  1171         public boolean hasErasedSupertypes() {
  1172             return true;
  1172             return true;
  1233         public boolean allInterfaces;
  1233         public boolean allInterfaces;
  1234 
  1234 
  1235         public IntersectionClassType(List<Type> bounds, ClassSymbol csym, boolean allInterfaces) {
  1235         public IntersectionClassType(List<Type> bounds, ClassSymbol csym, boolean allInterfaces) {
  1236             // Presently no way to refer to this type directly, so we
  1236             // Presently no way to refer to this type directly, so we
  1237             // cannot put annotations directly on it.
  1237             // cannot put annotations directly on it.
  1238             super(Type.noType, List.<Type>nil(), csym);
  1238             super(Type.noType, List.nil(), csym);
  1239             this.allInterfaces = allInterfaces;
  1239             this.allInterfaces = allInterfaces;
  1240             Assert.check((csym.flags() & COMPOUND) != 0);
  1240             Assert.check((csym.flags() & COMPOUND) != 0);
  1241             supertype_field = bounds.head;
  1241             supertype_field = bounds.head;
  1242             interfaces_field = bounds.tail;
  1242             interfaces_field = bounds.tail;
  1243             Assert.check(!supertype_field.tsym.isCompleted() ||
  1243             Assert.check(!supertype_field.tsym.isCompleted() ||
  2314             c.kind = ERR;
  2314             c.kind = ERR;
  2315             c.members_field = new Scope.ErrorScope(c);
  2315             c.members_field = new Scope.ErrorScope(c);
  2316         }
  2316         }
  2317 
  2317 
  2318         public ErrorType(Type originalType, TypeSymbol tsym) {
  2318         public ErrorType(Type originalType, TypeSymbol tsym) {
  2319             super(noType, List.<Type>nil(), null);
  2319             super(noType, List.nil(), null);
  2320             this.tsym = tsym;
  2320             this.tsym = tsym;
  2321             this.originalType = (originalType == null ? noType : originalType);
  2321             this.originalType = (originalType == null ? noType : originalType);
  2322         }
  2322         }
  2323 
  2323 
  2324         private ErrorType(Type originalType, TypeSymbol tsym,
  2324         private ErrorType(Type originalType, TypeSymbol tsym,
  2325                           TypeMetadata metadata) {
  2325                           TypeMetadata metadata) {
  2326             super(noType, List.<Type>nil(), null, metadata);
  2326             super(noType, List.nil(), null, metadata);
  2327             this.tsym = tsym;
  2327             this.tsym = tsym;
  2328             this.originalType = (originalType == null ? noType : originalType);
  2328             this.originalType = (originalType == null ? noType : originalType);
  2329         }
  2329         }
  2330 
  2330 
  2331         @Override
  2331         @Override