def __init__(self, original_root: expression.Expression, field_name: path.Step):
    super().__init__(True, None)
    self._field_name = field_name
    self._original_root = original_root
    self._new_root = original_root.get_child_or_error(field_name)
    if (self._new_root.type is not None):
        raise ValueError('New root must be a message type: {}'.format(str(self._field_name)))
def __init__(self, original_root: expression.Expression, field_name: path.Step):
    super().__init__(True, None)
    self._field_name = field_name
    self._original_root = original_root
    self._new_root = original_root.get_child_or_error(field_name)
    if (self._new_root.type is not None):
        raise ValueError('New root must be a message type: {}'.format(str(self._field_name)))