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

changeset 674
584365f256a7
parent 639
a75770c0d7f6
child 688
50f9ac2f4730
equal deleted inserted replaced
673:7ae4016c5938 674:584365f256a7
767 if (!c.type.isErroneous() 767 if (!c.type.isErroneous()
768 && s.owner.kind != MTH 768 && s.owner.kind != MTH
769 && types.isSameType(c.type, syms.deprecatedType)) 769 && types.isSameType(c.type, syms.deprecatedType))
770 s.flags_field |= Flags.DEPRECATED; 770 s.flags_field |= Flags.DEPRECATED;
771 // Internally to java.dyn, a @PolymorphicSignature annotation 771 // Internally to java.dyn, a @PolymorphicSignature annotation
772 // translates to a classfile attribute. 772 // acts like a classfile attribute.
773 if (!c.type.isErroneous() 773 if (!c.type.isErroneous() &&
774 && types.isSameType(c.type, syms.polymorphicSignatureType)) { 774 types.isSameType(c.type, syms.polymorphicSignatureType)) {
775 if (!target.hasMethodHandles()) {
776 // Somebody is compiling JDK7 source code to a JDK6 target.
777 // Make it a strict warning, since it is unlikely but important.
778 log.strictWarning(env.tree.pos(),
779 "wrong.target.for.polymorphic.signature.definition",
780 target.name);
781 }
782 // Pull the flag through for better diagnostics, even on a bad target.
775 s.flags_field |= Flags.POLYMORPHIC_SIGNATURE; 783 s.flags_field |= Flags.POLYMORPHIC_SIGNATURE;
776 } 784 }
777 if (!annotated.add(a.type.tsym)) 785 if (!annotated.add(a.type.tsym))
778 log.error(a.pos, "duplicate.annotation"); 786 log.error(a.pos, "duplicate.annotation");
779 } 787 }

mercurial