nashorn/src/jdk/nashorn/internal/ir/TernaryNode.java
changeset 21457 381acbd07fe5
parent 18867 bc91e3fcc5ba
child 24751 ccbd9cd3f720
equal deleted inserted replaced
21454:f165bf93bb48 21457:381acbd07fe5
   107         if (falseParen) {
   107         if (falseParen) {
   108             sb.append(')');
   108             sb.append(')');
   109         }
   109         }
   110     }
   110     }
   111 
   111 
       
   112     @Override
       
   113     public boolean isLocal() {
       
   114         return getTest().isLocal()
       
   115                 && getTrueExpression().isLocal()
       
   116                 && getFalseExpression().isLocal();
       
   117     }
       
   118 
   112     /**
   119     /**
   113      * Get the test expression for this ternary expression, i.e. "x" in x ? y : z
   120      * Get the test expression for this ternary expression, i.e. "x" in x ? y : z
   114      * @return the test expression
   121      * @return the test expression
   115      */
   122      */
   116     public Expression getTest() {
   123     public Expression getTest() {