title: swift downcast issue from superclass to subclass
body: <p>This is my code:</p>
  
  <pre><code>class Student {
      var name: String?
      init (name: String) {
          self.name = name
      }
  }
  
  class MasterStudent: Student {
      var degree: String?
      init(name: String, degree: String) {
          self.degree = degree
          super.init(name: name, degree: degree)
      }
  }
  
  fun updateStudent(stu: Student) {
      var count = 0
      for st in studentArray {            
          if (st.id == stu.id) {
              studentArray.removeAtIndex(count)
              st as! MasterStudent     //thread 1 signal :SIGABRT
              studentArray.append(stu)
          }
          count += 1
      }
  }
  </code></pre>
  
  <p>If I pass the function <code>updateStudent</code> a <code>Student</code> object, the cast to <code>MasterStudent</code> results in a crash. I want to turn the <code>Student</code> object into a <code>MasterStudent</code> object.</p>
  
  <p>thanks </p>