src/share/classes/com/sun/tools/javac/code/Types.java

changeset 110
91eea580fbe9
parent 104
5e89c4ca637c
child 113
eff38cc97183
     1.1 --- a/src/share/classes/com/sun/tools/javac/code/Types.java	Thu Sep 04 14:56:35 2008 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/javac/code/Types.java	Tue Sep 09 10:28:21 2008 -0700
     1.3 @@ -2187,6 +2187,20 @@
     1.4          };
     1.5      // </editor-fold>
     1.6  
     1.7 +    // <editor-fold defaultstate="collapsed" desc="createErrorType">
     1.8 +    public Type createErrorType(Type originalType) {
     1.9 +        return new ErrorType(originalType, syms.errSymbol);
    1.10 +    }
    1.11 +
    1.12 +    public Type createErrorType(ClassSymbol c, Type originalType) {
    1.13 +        return new ErrorType(c, originalType);
    1.14 +    }
    1.15 +
    1.16 +    public Type createErrorType(Name name, TypeSymbol container, Type originalType) {
    1.17 +        return new ErrorType(name, container, originalType);
    1.18 +    }
    1.19 +    // </editor-fold>
    1.20 +
    1.21      // <editor-fold defaultstate="collapsed" desc="rank">
    1.22      /**
    1.23       * The rank of a class is the length of the longest path between
    1.24 @@ -2604,7 +2618,7 @@
    1.25                  if (!bound.isInterface())
    1.26                      classCount++;
    1.27              if (classCount > 1)
    1.28 -                return syms.errType;
    1.29 +                return createErrorType(t);
    1.30          }
    1.31          return makeCompoundType(bounds);
    1.32      }

mercurial