equal
deleted
inserted
replaced
2818 /** Check an annotation of a symbol. |
2818 /** Check an annotation of a symbol. |
2819 */ |
2819 */ |
2820 private void validateAnnotation(JCAnnotation a, Symbol s) { |
2820 private void validateAnnotation(JCAnnotation a, Symbol s) { |
2821 validateAnnotationTree(a); |
2821 validateAnnotationTree(a); |
2822 |
2822 |
2823 if (!annotationApplicable(a, s)) |
2823 if (a.type.tsym.isAnnotationType() && !annotationApplicable(a, s)) |
2824 log.error(a.pos(), "annotation.type.not.applicable"); |
2824 log.error(a.pos(), "annotation.type.not.applicable"); |
2825 |
2825 |
2826 if (a.annotationType.type.tsym == syms.functionalInterfaceType.tsym) { |
2826 if (a.annotationType.type.tsym == syms.functionalInterfaceType.tsym) { |
2827 if (s.kind != TYP) { |
2827 if (s.kind != TYP) { |
2828 log.error(a.pos(), "bad.functional.intf.anno"); |
2828 log.error(a.pos(), "bad.functional.intf.anno"); |