title: Swift pass an array as argument error
body: <p>I'm just starting Swift. Can someone please explain to me why I can pass array as an argument (byRoundingCorners:)</p>
  
  <pre><code>UIBezierPath(
          roundedRect: self.bounds,
          byRoundingCorners: [.topLeft, .bottomLeft],
          cornerRadii: CGSize(width: radius, height: radius))
  </code></pre>
  
  <p>But passing it in variable, produces error</p>
  
  <pre><code>var corners = [UIRectCorner.topLeft, UIRectCorner.bottomLeft]
  let path = UIBezierPath(
          roundedRect: self.bounds,
          byRoundingCorners: corners,
          cornerRadii: CGSize(width: radius, height: radius))
  </code></pre>
  
  <p><strong>"Cannot convert value of type '[UIRectCorner]' to expected argument type 'UIRectCorner'"</strong></p>