langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java
changeset 8241 4161b56e0d20
parent 8236 0d8646b7c602
child 8242 3873b4aaf4a8
equal deleted inserted replaced
8240:a3b8f0f8af91 8241:4161b56e0d20
   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",