src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java
changeset 55641 4a03245ffc2f
parent 55137 c40c3e5d7c7a
child 58679 9c3209ff7550
child 59265 d9a3bddcffcc
equal deleted inserted replaced
55640:3081f39a3d30 55641:4a03245ffc2f
  1707                         if (clazz.isSubClass(sym, types) || sym.isMemberOf(clazz, types)) {
  1707                         if (clazz.isSubClass(sym, types) || sym.isMemberOf(clazz, types)) {
  1708                             return currentDepth > depth ? null : block.tree;
  1708                             return currentDepth > depth ? null : block.tree;
  1709                         }
  1709                         }
  1710                         break;
  1710                         break;
  1711                     case VARDEF:
  1711                     case VARDEF:
  1712                         if (((JCVariableDecl)block.tree).sym == sym &&
  1712                         if ((((JCVariableDecl)block.tree).sym == sym &&
  1713                                 sym.owner.kind == MTH) { //only locals are captured
  1713                                 sym.owner.kind == MTH) || //only locals are captured
       
  1714                             (block.locals != null && block.locals.contains(sym))) {
  1714                             return currentDepth > depth ? null : block.tree;
  1715                             return currentDepth > depth ? null : block.tree;
  1715                         }
  1716                         }
  1716                         break;
  1717                         break;
  1717                     case BLOCK:
  1718                     case BLOCK:
  1718                     case METHODDEF:
  1719                     case METHODDEF: