How button_primary macro can call button macro in Twig engine? I've tried this solution, but it doesn't work, it says that the function "button" does not exist:

{% macro button(label, type, size) %}
    {% set type = type|default('default') %}
    {% set size = size|default('large') %}
    {% set cls = ['btn'] %}

    <a href="#" class="{{ cls|join(' ') }}">{{ label }}</a>
{% endmacro %}

{% macro button_primary(label, size) %}
    {{ button(label, 'primary', size) }}
{% endmacro %}
Edit
Report