title: Array extension called from other module
body: <p>Array extension methods are unavailable from other modules (for example the XCTest project)</p>
  
  <p>For the sake of simplicity the code below does nothing but it can be used to reproduce the error</p>
  
  <pre><code>import Foundation
  
  extension Array {
      mutating func myMethod(toIndex: Int) -&gt; Int! {
          // no real code, it's here only to show the problem
          return 0
      }
  }
  </code></pre>
  
  <p>Calling it from the same module works as expected but from a test class don't</p>
  
  <pre><code>class MyProjectTests: XCTestCase {
      func testMoveObjectsFromIndexes1() {
          var arr = ["000", "001", "002", "003"]
          arr.myMethod(0)
      }
  }
  </code></pre>
  
  <p>I think this is correct because the method visibility is restricted to its own module, indeed I obtain the error <code>'[String]' does not have a member named 'myMethod'</code></p>
  
  <p>I've tried to define the extended method as <code>public</code> as shown below</p>
  
  <pre><code>extension Array {
      public mutating func myMethod(toIndex: Int) -&gt; Int! {
          // no real code, it's here only to show the problem
          return 0
      }
  }
  </code></pre>
  
  <p>But I get the compile error <code>'Extension of generic type 'Array&lt;T&gt;' from a different module cannot provide public declarations'</code></p>
  
  <p>Until Beta 7 using <code>public</code> solved the problem but under XCode 6.1 (6A1046a) I obtain this error</p>
  
  <p>How can I fix it to run under other modules/projects?</p>