langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java
changeset 35423 36c7b4ec7a8b
parent 35350 5ec1564e7b1f
child 36153 ed5063b304be
equal deleted inserted replaced
35422:1f1990a69517 35423:36c7b4ec7a8b
   237         } else if (allowPoly && inferenceContext.free(found)) {
   237         } else if (allowPoly && inferenceContext.free(found)) {
   238             //delay the check if there are inference variables in the found type
   238             //delay the check if there are inference variables in the found type
   239             //this means we are dealing with a partially inferred poly expression
   239             //this means we are dealing with a partially inferred poly expression
   240             owntype = shouldCheck ? resultInfo.pt : found;
   240             owntype = shouldCheck ? resultInfo.pt : found;
   241             if (resultInfo.checkMode.installPostInferenceHook()) {
   241             if (resultInfo.checkMode.installPostInferenceHook()) {
   242                 inferenceContext.addFreeTypeListener(List.of(found, resultInfo.pt),
   242                 inferenceContext.addFreeTypeListener(List.of(found),
   243                         instantiatedContext -> {
   243                         instantiatedContext -> {
   244                             ResultInfo pendingResult =
   244                             ResultInfo pendingResult =
   245                                     resultInfo.dup(inferenceContext.asInstType(resultInfo.pt));
   245                                     resultInfo.dup(inferenceContext.asInstType(resultInfo.pt));
   246                             check(tree, inferenceContext.asInstType(found), ownkind, pendingResult);
   246                             check(tree, inferenceContext.asInstType(found), ownkind, pendingResult);
   247                         });
   247                         });