title: unable to access public enum from within a framework
body: <p>I have been working on developing a framework and I have decided to create custom enums that extend the Error protocol to report to the host application when a domain specific error is encountered.</p>
  
  <p>i.e.</p>
  
  <pre><code>public enum MyCustomError: Error {
      case customCase(message: String)
  }
  </code></pre>
  
  <p>from the host application I have a response call back that is another enum with associated value</p>
  
  <p>i.e.</p>
  
  <pre><code>public enum MyCustomResponse {
      case success
      case error(Error)
  }
  </code></pre>
  
  <p>form within the host application I try to access the error by doing the following</p>
  
  <p>i.e.</p>
  
  <pre><code>let responseHandler: (MyCustomResponse) -&gt; Void = { response in
  
      switch response {
          case .error(let error):
              if case let MyCustomModule.MyCustomError.customCase(theErrorMessage) = error {
                  print(theErrorMessage)
              }
      }
  }
  </code></pre>
  
  <p>what I am getting is a message from the compiler telling me that <code>MyCustomModule has no member named MyCustomError</code>. If a loose the <code>MyCustomModule.</code> then the compiler complains <code>Use of unresolved identifier 'MyCustomError'</code>. I am importing <code>MyCustomModule</code>, and the access level of the <code>MyCustomError</code> is <code>public</code>, any ideas on how to solve this would be really appreciated.</p>
  
  <p>Thanks</p>
  
  <p>Note: I am developing my framework via cocoapods version <code>1.1.1</code> and using Xcode 8.2.1, swift version 3.0.2, supporting iOS version 8.0 and above.</p>
  
  <p><em>Generated interface</em></p>
  
  <pre><code>import Foundation 
  
  public enum MyCustomError : Error { 
      case customCase(message: String) 
  }
  </code></pre>