test/com/google/javascript/jscomp/NodeUtilTest.java
/**
   * When the left side is a destructuring pattern, generally it's not possible to identify the RHS
   * for a specific name on the LHS.
   */
When the left side is a destructuring pattern, generally it's not possible to identify the RHS
for a specific name on the LHS.
When the left side is a destructuring pattern generally it ' s not possible to identify the RHS for a specific name on the LHS .
@Test
  public void testGetRValueOfLValueInDestructuringPattern() {
    assertThat(NodeUtil.getRValueOfLValue(getNameNode(parse("var [x] = rhs;"), "x"))).isNull();
    assertThat(NodeUtil.getRValueOfLValue(getNameNode(parse("var [x, y] = rhs;"), "x"))).isNull();
    assertThat(NodeUtil.getRValueOfLValue(getNameNode(parse("var [y, x] = rhs;"), "x"))).isNull();
    assertThat(NodeUtil.getRValueOfLValue(getNameNode(parse("var {x: x} = rhs;"), "x"))).isNull();
    assertThat(NodeUtil.getRValueOfLValue(getNameNode(parse("var {y: x} = rhs;"), "x"))).isNull();
    Node ast = parse("var {x} = rhs;");
    Node x = ast.getFirstChild()   
                .getFirstChild()   
                .getFirstChild()   
                .getFirstChild();  
    checkState(x.isStringKey(), x);
    assertThat(NodeUtil.getRValueOfLValue(x)).isNull();
  }
@ Test public void testGetRValueOfLValueInDestructuringPattern ( ) { assertThat ( NodeUtil . getRValueOfLValue ( getNameNode ( parse ( "var [x] = rhs;" ) , "x" ) ) ) . isNull ( ) ; assertThat ( NodeUtil . getRValueOfLValue ( getNameNode ( parse ( "var [x, y] = rhs;" ) , "x" ) ) ) . isNull ( ) ; assertThat ( NodeUtil . getRValueOfLValue ( getNameNode ( parse ( "var [y, x] = rhs;" ) , "x" ) ) ) . isNull ( ) ; assertThat ( NodeUtil . getRValueOfLValue ( getNameNode ( parse ( "var {x: x} = rhs;" ) , "x" ) ) ) . isNull ( ) ; assertThat ( NodeUtil . getRValueOfLValue ( getNameNode ( parse ( "var {y: x} = rhs;" ) , "x" ) ) ) . isNull ( ) ; Node ast = parse ( "var {x} = rhs;" ) ; Node x = ast . getFirstChild ( ) . getFirstChild ( ) . getFirstChild ( ) . getFirstChild ( ) ; checkState ( x . isStringKey ( ) , x ) ; assertThat ( NodeUtil . getRValueOfLValue ( x ) ) . isNull ( ) ; }
When the left side is a destructuring pattern, generally it's not possible to identify the RHS
 for a specific name on the LHS.
When the left side is a destructuring pattern generally it ' s not possible to identify the RHS for a specific name on the LHS .
// VAR // DESTRUCTURING_LHS // OBJECT_PATTERN //STRING_KEY