langtools/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java
changeset 15705 c4124695db0c
parent 15374 fb8f6acf09cc
child 15706 37a81a6987ac
equal deleted inserted replaced
15704:02afd052face 15705:c4124695db0c
   371                     }
   371                     }
   372                 }
   372                 }
   373                 if (!progress) {
   373                 if (!progress) {
   374                     //remove all variables that have already been instantiated
   374                     //remove all variables that have already been instantiated
   375                     //from the list of stuck variables
   375                     //from the list of stuck variables
   376                     inferenceContext.solveAny(inferenceContext.freeVarsIn(List.from(stuckVars)), types, infer);
   376                     inferenceContext.solveAny(inferenceContext.freeVarsIn(List.from(stuckVars)));
   377                     inferenceContext.notifyChange(types);
   377                     inferenceContext.notifyChange();
   378                 }
   378                 }
   379             }
   379             }
   380         }
   380         }
   381 
   381 
   382         /**
   382         /**
   383          * Class representing a deferred attribution node. It keeps track of
   383          * Class representing a deferred attribution node. It keeps track of
   384          * a deferred type, along with the expected target type information.
   384          * a deferred type, along with the expected target type information.
   385          */
   385          */
   386         class DeferredAttrNode implements Infer.InferenceContext.FreeTypeListener {
   386         class DeferredAttrNode implements Infer.FreeTypeListener {
   387 
   387 
   388             /** underlying deferred type */
   388             /** underlying deferred type */
   389             DeferredType dt;
   389             DeferredType dt;
   390 
   390 
   391             /** underlying target type information */
   391             /** underlying target type information */
   404             }
   404             }
   405 
   405 
   406             @Override
   406             @Override
   407             public void typesInferred(InferenceContext inferenceContext) {
   407             public void typesInferred(InferenceContext inferenceContext) {
   408                 stuckVars = List.nil();
   408                 stuckVars = List.nil();
   409                 resultInfo = resultInfo.dup(inferenceContext.asInstType(resultInfo.pt, types));
   409                 resultInfo = resultInfo.dup(inferenceContext.asInstType(resultInfo.pt));
   410             }
   410             }
   411 
   411 
   412             /**
   412             /**
   413              * Process a deferred attribution node.
   413              * Process a deferred attribution node.
   414              * Invariant: a stuck node cannot be processed.
   414              * Invariant: a stuck node cannot be processed.