title: Optional generic type doesn't accept nil in method call
body: <p>Using the typed Enum feature of Swift 2 I can define some <em>events</em> that can be broadcasted and listened by my app. Doing so I can have the compiler check things for me and also I don't have to provide strings.</p>
  
  <pre><code>protocol Event: RawRepresentable {}
  
  // Somewhere in a view
  enum SettingsEvent: String, Event {
      case Bar
      case Baz
  }
  
  // Somewhere else in the app
  enum ViewEvents: String, Event {
      case Foo
      case Bar
  }
  </code></pre>
  
  <p>Events can be broadcasted, and this is the function that performs that.
  I need to use two generic types because:</p>
  
  <ul>
  <li>protocol 'Event' can only be used as a generic constraint because it has Self or associated type requirements</li>
  <li>V is passed to another generic collection that I control</li>
  </ul>
  
  
  
  <pre><code>func broadcastEvent&lt;E: Event, V: AnyObject&gt;(event: E, withValue value: V? = nil) {
      // Do something with event and value. This is not the real function body
      print(event.rawValue)
      if let v = value {
          print(v)
      }
  }
  </code></pre>
  
  <p>Now, this call works:</p>
  
  <pre><code>broadcastEvent(SettingsEvent.Baz, withValue: "aa")
  </code></pre>
  
  <p>While these don't work</p>
  
  <pre><code>broadcastEvent(SettingsEvent.Baz)
  broadcastEvent(SettingsEvent.Baz, withValue: nil)
  </code></pre>
  
  <p>The compiler says:</p>
  
  <blockquote>
    <p>error: cannot invoke 'broadcastEvent' with an argument list of type '(SettingsEvent, withValue: NilLiteralConvertible)'</p>
    
    <p>note: expected an argument list of type '(E, withValue: V?)'</p>
  </blockquote>
  
  <p>What's wrong with this?</p>