title: Difference between fileprivate and private extension?
body: <p><strong>Swift 3.0</strong></p>
  
  <p>I know that <code>fileprivate</code> access level modifier limited using of function/property to source file where it was declared and <code>private</code> - limited to lexical scope where was declared. But it seems that this rule not apply for extensions. E.G. this code is valid:</p>
  
  <pre><code>class Foo {
  }
  
  fileprivate extension Foo {
      var aa: Int {
          return aaa + 10
      }
  }
  
  private extension Foo {
      var aaa: Int {
          return 20
      }
  }
  </code></pre>
  
  <p>Can someone help me figured out difference between them? Thanks.</p>
  
  <p><strong>Swift 4.0</strong></p>
  
  <p><code>private</code> is now accessible in extension but within same file. If you declare/define extension in other file, then your private variable will not be accessible to your extension.</p>
  
  <p><code>fileprivate</code> is accessible within same file.</p>