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

changeset 1497
7aa2025bbb7b
parent 1496
f785dcac17b7
child 1510
7873d37f5b37
equal deleted inserted replaced
1496:f785dcac17b7 1497:7aa2025bbb7b
2599 2599
2600 if (a.annotationType.type.tsym == syms.overrideType.tsym) { 2600 if (a.annotationType.type.tsym == syms.overrideType.tsym) {
2601 if (!isOverrider(s)) 2601 if (!isOverrider(s))
2602 log.error(a.pos(), "method.does.not.override.superclass"); 2602 log.error(a.pos(), "method.does.not.override.superclass");
2603 } 2603 }
2604
2605 if (a.annotationType.type.tsym == syms.functionalInterfaceType.tsym) {
2606 if (s.kind != TYP) {
2607 log.error(a.pos(), "bad.functional.intf.anno");
2608 } else {
2609 try {
2610 types.findDescriptorSymbol((TypeSymbol)s);
2611 } catch (Types.FunctionDescriptorLookupError ex) {
2612 log.error(a.pos(), "bad.functional.intf.anno.1", ex.getDiagnostic());
2613 }
2614 }
2615 }
2604 } 2616 }
2605 2617
2606 /** 2618 /**
2607 * Validate the proposed container 'repeatable' on the 2619 * Validate the proposed container 'repeatable' on the
2608 * annotation type symbol 's'. Report errors at position 2620 * annotation type symbol 's'. Report errors at position

mercurial