code: private void checkCanAssignToWithScope(
        NodeTraversal t, Node nodeToWarn, Node lvalue, JSType rightType, JSDocInfo info, String msg) {
      if (lvalue.isDestructuringPattern()) {
        checkDestructuringAssignment(t, nodeToWarn, lvalue, rightType, msg);
      } else {
        checkCanAssignToNameGetpropOrGetelem(t, nodeToWarn, lvalue, rightType, info, msg);
      }
    }
docs: Checks that we can assign the given right type to the given lvalue or destructuring pattern.
  
  <p>See {@link #checkCanAssignToNameGetpropOrGetelem(NodeTraversal, Node, Node, JSType,
  JSDocInfo, String)} for more details
  
  @param nodeToWarn A node to report type mismatch warnings on
  @param lvalue The lvalue to which we're assigning or a destructuring pattern
  @param rightType The type we're assigning to the lvalue
  @param msg A message to report along with any type mismatch warnings