title: Why does my custom class not recognize swift extensions? (i.e. String)
body: <p>I have a string extension in which I define a function that calculates the DamerauLevenshtein distance between two different strings. When adding the following code:</p>
  
  <pre><code>var result = "Hello"
  result.damerauLevenshteinTo("Hellow") 
  </code></pre>
  
  <p>in any other class such as a UIViewController, UITableViewController, etc. the code compiles fine.
  As soon as I try adding it to my own class defined as  <code>class CustomClass: AnyObject</code> I get the following error message.</p>
  
  <blockquote>
    <p>Value of type String has no member 'damerauLevenshteinTo'</p>
  </blockquote>
  
  <p>What am I missing? Thanks!</p>
  
  <p><strong>Update</strong> Copy pasting the entire class with the extension to an empty project compiles great... Moving it to the old project still gives me the error no matter what I try.</p>
  
  <p><strong>Update 2</strong> It seems I can't use any custom classes or subclasses inside this class. Hm...</p>
  
  <p><strong>Update 3</strong> Deleting the file and pasting the class in a new one got rid of the error after about the third time... Hurray</p>