langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java
changeset 44393 ce94820fa9d1
parent 44392 e21b18355690
child 44571 1140b8dad6bb
equal deleted inserted replaced
44392:e21b18355690 44393:ce94820fa9d1
  1523                     JCConditional condTree = (JCConditional)tree;
  1523                     JCConditional condTree = (JCConditional)tree;
  1524                     return isBooleanOrNumeric(env, condTree.truepart) &&
  1524                     return isBooleanOrNumeric(env, condTree.truepart) &&
  1525                             isBooleanOrNumeric(env, condTree.falsepart);
  1525                             isBooleanOrNumeric(env, condTree.falsepart);
  1526                 case APPLY:
  1526                 case APPLY:
  1527                     JCMethodInvocation speculativeMethodTree =
  1527                     JCMethodInvocation speculativeMethodTree =
  1528                             (JCMethodInvocation)deferredAttr.attribSpeculative(tree, env, unknownExprInfo);
  1528                             (JCMethodInvocation)deferredAttr.attribSpeculative(
       
  1529                                     tree, env, unknownExprInfo,
       
  1530                                     argumentAttr.withLocalCacheContext());
  1529                     Symbol msym = TreeInfo.symbol(speculativeMethodTree.meth);
  1531                     Symbol msym = TreeInfo.symbol(speculativeMethodTree.meth);
  1530                     Type receiverType = speculativeMethodTree.meth.hasTag(IDENT) ?
  1532                     Type receiverType = speculativeMethodTree.meth.hasTag(IDENT) ?
  1531                             env.enclClass.type :
  1533                             env.enclClass.type :
  1532                             ((JCFieldAccess)speculativeMethodTree.meth).selected.type;
  1534                             ((JCFieldAccess)speculativeMethodTree.meth).selected.type;
  1533                     Type owntype = types.memberType(receiverType, msym).getReturnType();
  1535                     Type owntype = types.memberType(receiverType, msym).getReturnType();
  1534                     return primitiveOrBoxed(owntype);
  1536                     return primitiveOrBoxed(owntype);
  1535                 case NEWCLASS:
  1537                 case NEWCLASS:
  1536                     JCExpression className =
  1538                     JCExpression className =
  1537                             removeClassParams.translate(((JCNewClass)tree).clazz);
  1539                             removeClassParams.translate(((JCNewClass)tree).clazz);
  1538                     JCExpression speculativeNewClassTree =
  1540                     JCExpression speculativeNewClassTree =
  1539                             (JCExpression)deferredAttr.attribSpeculative(className, env, unknownTypeInfo);
  1541                             (JCExpression)deferredAttr.attribSpeculative(
       
  1542                                     className, env, unknownTypeInfo,
       
  1543                                     argumentAttr.withLocalCacheContext());
  1540                     return primitiveOrBoxed(speculativeNewClassTree.type);
  1544                     return primitiveOrBoxed(speculativeNewClassTree.type);
  1541                 default:
  1545                 default:
  1542                     Type speculativeType = deferredAttr.attribSpeculative(tree, env, unknownExprInfo).type;
  1546                     Type speculativeType = deferredAttr.attribSpeculative(tree, env, unknownExprInfo,
       
  1547                             argumentAttr.withLocalCacheContext()).type;
  1543                     return primitiveOrBoxed(speculativeType);
  1548                     return primitiveOrBoxed(speculativeType);
  1544             }
  1549             }
  1545         }
  1550         }
  1546         //where
  1551         //where
  1547             boolean primitiveOrBoxed(Type t) {
  1552             boolean primitiveOrBoxed(Type t) {