title: How to call a generic function with parameter of associated type in Swift 3
body: <p>Here's my sample code:</p>
  
  <pre><code>protocol P {
  
  }
  
  protocol B {
  
    associatedtype ID: P
  
  }
  
  class MyClass: B {
    enum ID: P {
      case one
      case two
    }
  }
  
  func process&lt;T: B&gt;(_ value: T.ID) {
    // do something
  }
  
  process(MyClass.ID.one) // Compile Error: cannot convert value of type 'MyClass.ID' to expected argument type '_.ID'
  </code></pre>
  
  <p>As you can see, I define a generic function with a parameter whose type is an <strong>associated type</strong> of the <strong>generic type</strong> <strong>T</strong>. How can I call this function? I want to use <strong>MyClass.ID.one</strong> as the argument, but the compiler gives the following warning:</p>
  
  <pre><code>cannot convert value of type 'MyClass.ID' to expected argument type '_.ID'
  </code></pre>