title: Nested functions error in swift
body: <p>I am trying to use nested functions in my Swift Program.</p>
  
  <pre><code>func test()-&gt;Bool{
      func test1()-&gt;Bool{
          return true
      }
  
      func test2()-&gt;Bool{
          return true
      }
  
      func test3()-&gt;Bool{
          return true
      }
      return test1 &amp;&amp; test2 &amp;&amp; test3
   }
  </code></pre>
  
  <p>Its giving me some error! But if i try to</p>
  
  <pre><code>return test1
  </code></pre>
  
  <p>Its working fine. </p>
  
  <p>Please explain why its giving me error on applying operators in nested function.</p>