title: Swift override function in extension
body: <p>If I have a class:</p>
  
  <pre><code>class Spaceship&lt;FuelType&gt; {
      function prepareForLiftoff() throws {
          //Start the countdown!
      }
  }
  </code></pre>
  
  <p>I originally assumed that I would be able to override <code>prepareForLiftoff</code> without subclassing by adding an extension:</p>
  
  <pre><code>extension Spaceship where FuelType: CollectionType {
      func prepareForLiftoff() throws {}
  } 
  </code></pre>
  
  <p>This code doesn't compile though, the error says <code>invalid redeclaration</code> of the function, which makes sense.</p>
  
  <p><strong>My question is:</strong> Is there anyway to override a function of a particular class? In other words can I replace the functionality under certain conditions like the example above where <code>FuelType: CollectionType</code>. If not, is there any other workaround or way to achieve that behavior (maybe declaring another protocol, idk)</p>
  
  <p>Now that I think about it more, I would have to say that's not possible because what's to stop someone from overriding any of the standard library functions?</p>