title: swift protocol extension on BooleanType not works as expect
body: <p>This code comes from
  <a href="https://www.raywenderlich.com/109156/introducing-protocol-oriented-programming-in-swift-2" rel="nofollow">https://www.raywenderlich.com/109156/introducing-protocol-oriented-programming-in-swift-2</a></p>
  
  <p>it works mostly , except the BooleanType part</p>
  
  <pre><code>import Foundation
  
  protocol Bird: BooleanType {
    var name: String { get }
    var canFly: Bool { get }
  }
  
  protocol Flyable {
    var airspeedVelocity: Double { get }
  }
  
  
  struct Penguin: Bird {
    let name: String
    let canFly = false
  }
  
  struct SwiftBird: Bird, Flyable {
    var name: String { return "Swift \(version)" }
    let version: Double
    var airspeedVelocity: Double { return 2000.0 }
  }
  
  
  extension Bird where Self: Flyable {
    // Flyable birds can fly!
    var canFly: Bool { return true }
  }
  
  extension BooleanType where Self: Bird {
    var boolValue: Bool {
      return self.canFly
    }
  }
  
  
  let bunchaBirds: [Bird] = 
    [
    Penguin(name: "King Penguin"),
    SwiftBird(version: 2.0),
    ]
  
  //Boolean Type works directly on struct or enum type
  if Penguin(name: "King Penguin") {
    print("I can fly!")
  } else {
    print("Guess I’ll just sit here :[")
  }
  
  for bird in bunchaBirds {
    print("")
    print("for bird \(bird.name) it can fly ? \(bird.canFly)")
  
    //this works
    if bird as BooleanType {
  
    //this also  works
    //if bird.boolValue {
  
    //but this fail, 
    //if bird {
        print("\(bird.name): I can fly!")
    } else {
        print("\(bird.name): Guess I’ll just sit here :[")
    }
  }
  </code></pre>
  
  <p>When object in array as Bird type, the BooleanType simply not works.
  You have to explicit cast it or use bird.boolValue , it seems strange to me !!</p>