title: Twig: Cannot override a block that's defined in a macro
body: <p>I am importing a macro from a layout file, and inside that macro I define a few twig blocks.</p>
  
  <p>When I extend my 'base' layout file in a new 'view' file, I cannot override the content of the blocks that I defined in the macro.</p>
  
  <p>Here is a very simplified, minimal version of my use-case.</p>
  
  <p><strong>Structure:</strong></p>
  
  <p><strong>base.twig</strong></p>
  
  <pre><code>{% import 'macros' as macros %}
  &lt;section&gt;
      {{ macros.render_sections() }}
  
      {% block working %}
         content1-default
      {% endblock %}
  &lt;/section&gt;
  </code></pre>
  
  <p><strong>macro.twig</strong></p>
  
  <pre><code>{% macro render_sections() %}
      &lt;section&gt;
        {% block notworking %}
           content2-default
        {% endblock %}
      &lt;/section&gt;
  {% endmacro %}
  </code></pre>
  
  <p><strong>view.twig</strong></p>
  
  <pre><code>{% extends "base" %}
  
  {% block working %}
     content1-override
  {% endblock %}
  
  {% block notworking %}
      content2-override
  {% endblock %}
  </code></pre>
  
  <p><strong>Expected behavior</strong>: 
  I expect to see "content1-override content2-override" in my html.</p>
  
  <p><strong>What actually happens</strong>: 
  I see 'content1-override content2-default'</p>
  
  <p>Is there a way to pass the blocks scope to a macro?</p>
  
  <p>I have tried defining the macro inside the base.twig file, as to rule out the import function, but that didn't help.
  and obviously everything else works because I can see the block that does get overriden.</p>