src/share/classes/com/sun/tools/javac/comp/Check.java

changeset 609
13354e1abba7
parent 608
472e74211e11
child 612
d1bd93028447
     1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Check.java	Thu Jul 15 16:31:56 2010 +0100
     1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Check.java	Fri Jul 16 19:35:24 2010 -0700
     1.3 @@ -393,6 +393,10 @@
     1.4       *  @param req        The type that was required.
     1.5       */
     1.6      Type checkType(DiagnosticPosition pos, Type found, Type req) {
     1.7 +        return checkType(pos, found, req, "incompatible.types");
     1.8 +    }
     1.9 +
    1.10 +    Type checkType(DiagnosticPosition pos, Type found, Type req, String errKey) {
    1.11          if (req.tag == ERROR)
    1.12              return req;
    1.13          if (found.tag == FORALL)
    1.14 @@ -411,7 +415,7 @@
    1.15              log.error(pos, "assignment.to.extends-bound", req);
    1.16              return types.createErrorType(found);
    1.17          }
    1.18 -        return typeError(pos, diags.fragment("incompatible.types"), found, req);
    1.19 +        return typeError(pos, diags.fragment(errKey), found, req);
    1.20      }
    1.21  
    1.22      /** Instantiate polymorphic type to some prototype, unless

mercurial