<html>
    <head>
      <base href="http://bugzilla.gdcproject.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - internal error when nesting class and recursive calls"
   href="http://bugzilla.gdcproject.org/show_bug.cgi?id=191#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - internal error when nesting class and recursive calls"
   href="http://bugzilla.gdcproject.org/show_bug.cgi?id=191">bug 191</a>
              from <span class="vcard"><a class="email" href="mailto:ibuclaw@gdcproject.org" title="Iain Buclaw <ibuclaw@gdcproject.org>"> <span class="fn">Iain Buclaw</span></a>
</span></b>
        <pre>Extending from the original PR, there are another two tests to consider (which
shows why it gets complicated).

class OuterClass
{
  void recurse()
  {
    class InnerClass
    {
      void test()
      {
        void localFunction()
        {
          void anotherLocalFunction()
          {
            recurse();   // Ensure we handle Nth depth.
          }

          anotherLocalFunction();
        }

        localFunction();
      }
    }
  }
}


class OuterClass
{
  void recurse()
  {
    class InnerClass
    {
      void test()
      {
        void localFunction()
        {
          int a = 42;

          void anotherLocalFunction()
          {
            a++;       // And correctly handle any
                       // static chains along the way.
            recurse();
          }

          anotherLocalFunction();
        }

        localFunction();
      }
    }
  }
}</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are watching all bug changes.</li>
      </ul>
    </body>
</html>