langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java
changeset 18008 6d75e3886bac
parent 16967 79d444669f3f
child 18395 d56a5fbf0b32
equal deleted inserted replaced
18007:0afa95bd8bc3 18008:6d75e3886bac
   216         Assert.check(allowGraphInference || !resultInfo.checkContext.inferenceContext().free(to),
   216         Assert.check(allowGraphInference || !resultInfo.checkContext.inferenceContext().free(to),
   217                 "legacy inference engine cannot handle constraints on both sides of a subtyping assertion");
   217                 "legacy inference engine cannot handle constraints on both sides of a subtyping assertion");
   218         //we need to skip capture?
   218         //we need to skip capture?
   219         Warner retWarn = new Warner();
   219         Warner retWarn = new Warner();
   220         if (!resultInfo.checkContext.compatible(qtype1, resultInfo.checkContext.inferenceContext().asFree(to), retWarn) ||
   220         if (!resultInfo.checkContext.compatible(qtype1, resultInfo.checkContext.inferenceContext().asFree(to), retWarn) ||
   221                 //unchecked conversion is not allowed
   221                 //unchecked conversion is not allowed in source 7 mode
   222                 retWarn.hasLint(Lint.LintCategory.UNCHECKED)) {
   222                 (!allowGraphInference && retWarn.hasLint(Lint.LintCategory.UNCHECKED))) {
   223             throw inferenceException
   223             throw inferenceException
   224                     .setMessage("infer.no.conforming.instance.exists",
   224                     .setMessage("infer.no.conforming.instance.exists",
   225                     inferenceContext.restvars(), mt.getReturnType(), to);
   225                     inferenceContext.restvars(), mt.getReturnType(), to);
   226         }
   226         }
   227     }
   227     }