title: expression pattern of type 'CountableClosedRange<Int>' cannot match values of type 'Int'?
body: <p>At one point before Swift 3 this code would work without any compile errors however after converting to Swift 3 this code isn't compiling and I don't completely understand how the value types are different.</p>
  
  <p>The error given is <code>expression pattern of type 'CountableClosedRange&lt;Int&gt;' cannot match values of type 'Int'</code> for the switch cases where I'm attempting to use different ranges of values in the switch statement:</p>
  
  <pre><code>switch hour {
          case 0 ... 11:
              greetingStatement.text = "Good Morning"
          case 12 ... 24:
              greetingStatement.text = "Good Evening"
          default:
              greetingStatement.text = "Hello"
          }
  </code></pre>
  
  <p>Here is the full code:</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController {
  
  
      @IBOutlet weak var userInput: UITextField!
      @IBOutlet weak var usertOutput: UILabel!
  
      @IBOutlet weak var tapMeAfterEnteringYourName: UIButton!
  
      @IBOutlet weak var greetingStatement: UILabel!
      @IBOutlet weak var letsGetStartedLabel: UILabel!
  
      @IBOutlet weak var ballonsImageView: UIImageView!
      @IBOutlet weak var teacherPointingToBoardImage: UIImageView!
      @IBAction func setOutput(_ sender: AnyObject){
          greetingStatement.isHidden = false
          usertOutput.text=userInput.text
          tapMeAfterEnteringYourName.isHidden = true
          userInput.isHidden = true
          letsGetStartedLabel.isHidden = false
          ballonsImageView.isHidden = false
  
          let date = Date()
          let calendar = Calendar.current
          let components = (calendar as NSCalendar).components([.hour], from: date)
          let hour = components.hour
          switch hour {
          case 0 ... 11:
              greetingStatement.text = "Good Morning"
          case 12 ... 24:
              greetingStatement.text = "Good Evening"
          default:
              greetingStatement.text = "Hello"
          }
          view.backgroundColor = UIColor.magenta
          teacherPointingToBoardImage.isHidden=true
  
          var timer = Timer.scheduledTimer(timeInterval: 1.4, target: self, selector: #selector(ViewController.updateViewController), userInfo: nil, repeats: false)
  
  
          let hover = CABasicAnimation(keyPath: "position")
          hover.isAdditive = true
          hover.fromValue = NSValue(cgPoint: CGPoint.zero)
          hover.toValue = NSValue(cgPoint: CGPoint(x: 0.0, y: -100.0))
          hover.autoreverses = true
          hover.duration = 5
          hover.repeatCount = Float.infinity
          ballonsImageView.layer.add(hover, forKey: "myHoverAnimation")
  
  
  
      }
  
      func updateViewController() {
  
          print("Timer just fired")
          let storyBoard : UIStoryboard = UIStoryboard(name: "Main", bundle:nil)
          let resultViewController = storyBoard.instantiateViewController(withIdentifier: "MadLibOneViewController") as! MadLibOneViewController
          self.present(resultViewController, animated:true, completion:nil)
  
      }
  
      override func viewDidLoad() {
          super.viewDidLoad()
          view.backgroundColor=UIColor.purple
          usertOutput.textColor=UIColor.white
          userInput.textColor = UIColor.purple
          greetingStatement.isHidden = true
          letsGetStartedLabel.isHidden = true
          ballonsImageView.isHidden = true
  
  
  
  
  
  
  
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
      }
  
  
  }
  </code></pre>
  
  <p>Can someone clarify that  is simply a generic where any type of Int is allowable or expected?</p>