equal
deleted
inserted
replaced
773 return result; |
773 return result; |
774 } |
774 } |
775 |
775 |
776 public JCExpression unannotatedType(boolean allowVar) { |
776 public JCExpression unannotatedType(boolean allowVar) { |
777 JCExpression result = term(TYPE); |
777 JCExpression result = term(TYPE); |
778 Name restrictedTypeName; |
778 Name restrictedTypeName = restrictedTypeName(result, !allowVar); |
779 |
779 |
780 if (!allowVar && (restrictedTypeName = restrictedTypeName(result, true)) != null) { |
780 if (restrictedTypeName != null && (!allowVar || restrictedTypeName != names.var)) { |
781 syntaxError(result.pos, Errors.RestrictedTypeNotAllowedHere(restrictedTypeName)); |
781 syntaxError(result.pos, Errors.RestrictedTypeNotAllowedHere(restrictedTypeName)); |
782 } |
782 } |
783 |
783 |
784 return result; |
784 return result; |
785 } |
785 } |