785 // Note: @Deprecated has no effect on local variables and parameters |
785 // Note: @Deprecated has no effect on local variables and parameters |
786 if (!c.type.isErroneous() |
786 if (!c.type.isErroneous() |
787 && s.owner.kind != MTH |
787 && s.owner.kind != MTH |
788 && types.isSameType(c.type, syms.deprecatedType)) |
788 && types.isSameType(c.type, syms.deprecatedType)) |
789 s.flags_field |= Flags.DEPRECATED; |
789 s.flags_field |= Flags.DEPRECATED; |
790 // Internally to java.dyn, a @PolymorphicSignature annotation |
790 // Internally to java.lang.invoke, a @PolymorphicSignature annotation |
791 // acts like a classfile attribute. |
791 // acts like a classfile attribute. |
792 if (!c.type.isErroneous() && |
792 if (!c.type.isErroneous() && |
793 types.isSameType(c.type, syms.polymorphicSignatureType)) { |
793 (types.isSameType(c.type, syms.polymorphicSignatureType) || |
|
794 types.isSameType(c.type, syms.transientPolymorphicSignatureType))) { |
794 if (!target.hasMethodHandles()) { |
795 if (!target.hasMethodHandles()) { |
795 // Somebody is compiling JDK7 source code to a JDK6 target. |
796 // Somebody is compiling JDK7 source code to a JDK6 target. |
796 // Make it an error, since it is unlikely but important. |
797 // Make it an error, since it is unlikely but important. |
797 log.error(env.tree.pos(), |
798 log.error(env.tree.pos(), |
798 "wrong.target.for.polymorphic.signature.definition", |
799 "wrong.target.for.polymorphic.signature.definition", |