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