6949040: java.dyn package must be compiled with -target 7 or better
Issue error (rather than warning) when @PolymorphicSignature is found and target < 7 Reviewed-by: jjg
This commit is contained in:
parent
ede9924b4e
commit
0dae258b02
@ -781,8 +781,8 @@ public class MemberEnter extends JCTree.Visitor implements Completer {
|
||||
types.isSameType(c.type, syms.polymorphicSignatureType)) {
|
||||
if (!target.hasMethodHandles()) {
|
||||
// Somebody is compiling JDK7 source code to a JDK6 target.
|
||||
// Make it a strict warning, since it is unlikely but important.
|
||||
log.strictWarning(env.tree.pos(),
|
||||
// Make it an error, since it is unlikely but important.
|
||||
log.error(env.tree.pos(),
|
||||
"wrong.target.for.polymorphic.signature.definition",
|
||||
target.name);
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ compiler.err.call.to.super.not.allowed.in.enum.ctor=\
|
||||
compiler.err.no.superclass=\
|
||||
{0} has no superclass
|
||||
|
||||
compiler.warn.wrong.target.for.polymorphic.signature.definition=\
|
||||
compiler.err.wrong.target.for.polymorphic.signature.definition=\
|
||||
MethodHandle API building requires -target 7 runtimes or better; current is -target {0}
|
||||
|
||||
compiler.err.concrete.inheritance.conflict=\
|
||||
|
@ -43,6 +43,7 @@ compiler.err.undetermined.type
|
||||
compiler.err.unexpected.type
|
||||
compiler.err.unknown.enum.constant # in bad class file
|
||||
compiler.err.unsupported.cross.fp.lit # Scanner: host system dependent
|
||||
compiler.err.wrong.target.for.polymorphic.signature.definition # Transitional 292
|
||||
compiler.misc.assignment.from.super-bound
|
||||
compiler.misc.assignment.to.extends-bound
|
||||
compiler.misc.bad.class.file.header # bad class file
|
||||
@ -112,4 +113,3 @@ compiler.warn.proc.type.already.exists # JavacFiler: just menti
|
||||
compiler.warn.unchecked.assign # DEAD, replaced by compiler.misc.unchecked.assign
|
||||
compiler.warn.unchecked.cast.to.type # DEAD, replaced by compiler.misc.unchecked.cast.to.type
|
||||
compiler.warn.unexpected.archive.file # Paths: zip file with unknown extn
|
||||
compiler.warn.wrong.target.for.polymorphic.signature.definition # Transitional 292
|
||||
|
Loading…
Reference in New Issue
Block a user