How to redirect if entry has children? How can i redirect to the first child if an entry has children?

Something like this:

{% if entry.hasDescendants() %}
    {% redirect "{{ entry.getChildren().first().url }}" %}
{% endif %}
You have twig syntax ({{...}}) inside twig syntax ({%...%}), which is never right. Does this work?

{% if entry.hasDescendants() %}
  {% redirect entry.getChildren().first().url %}
{% endif %}