title: Declare class variable as conforming to Swift protocol
body: <p>In Swift, how would I declare a variable that explicitly states that it conforms to some protocol? The objective-c equivalent would be <code>@property id&lt;NSObject&gt;</code>
  From my understanding, doing this:</p>
  
  <p><code>var a: NSObject</code> </p>
  
  <p>declares a variable that is of type NSObject protocol but I don't to do that, I want to declare a variable of type <code>AnyObject</code> that conforms. I'm also interested in finding out how to declare an array of objects in which each object conforms to that protocol.</p>