diff -r 32c50b5f70b5 -r c8acc254b6d7 src/share/classes/com/sun/tools/javac/comp/Infer.java --- a/src/share/classes/com/sun/tools/javac/comp/Infer.java Tue Jun 04 11:31:12 2013 +0100 +++ b/src/share/classes/com/sun/tools/javac/comp/Infer.java Tue Jun 04 11:34:31 2013 +0100 @@ -218,8 +218,8 @@ //we need to skip capture? Warner retWarn = new Warner(); if (!resultInfo.checkContext.compatible(qtype1, resultInfo.checkContext.inferenceContext().asFree(to), retWarn) || - //unchecked conversion is not allowed - retWarn.hasLint(Lint.LintCategory.UNCHECKED)) { + //unchecked conversion is not allowed in source 7 mode + (!allowGraphInference && retWarn.hasLint(Lint.LintCategory.UNCHECKED))) { throw inferenceException .setMessage("infer.no.conforming.instance.exists", inferenceContext.restvars(), mt.getReturnType(), to);