title: Swift Generics Console Output
body: <p>After I enable this class inside Playground I am Losing all the Console Output written above this class. What is wrong with this ? and weirdly it is showing an error 'Expected Pattern' at the switch statement for sometime and later the error goes away</p>
  
  <pre><code>class Cart&lt;T&gt; {
      var customerName: String
      var customerEmail: String
      var items: [T]
      var itemCount: Int {
          return items.count
      }
      var promoCode: String? = nil
      init(customerName: String, customerEmail: String){
          self.customerName = customerName
          self.customerEmail = customerEmail
          items = [T]()
      }
  
      func add (item: T) -&gt; () {
          items.append(item)
      }
  
      func clear () -&gt; () {
          items.removeAll(keepCapacity: false)
      }
  
      func remove (position: Int) -&gt; () {
          items.removeAtIndex(position - 1)
      }
  
      func getPromoCodeDisplay () -&gt; (String) {
          if let x = promoCode {
              return "Your promo code is \(x)"
          } else {
              return "You do not have a promo code"
          }
      }
  
      func getCartStatus () -&gt; (String) {
          switch itemCount {
          case : 0
          return "You have no items in your cart."
          case : 1...3
          return "You have \(itemCount) items in your cart."
          default :
              return "You are an awesome customer!!"
          }
      }
  }
  </code></pre>