title: Generic interface declaration not working as-is on typescript 0.9.5
body: <p>I have an interface that defines a generic method, that returns a generic instance. For type safety I put some retractions to the type of the returned instances.</p>
  
  <p>Here is some sample code:</p>
  
  <pre><code>class Animal {
  }
  
  class Dog extends Animal {
      name: string;
  }
  
  interface IGreeter {
      greet&lt;T extends Animal&gt;(): T;
  }
  
  class Greeter implements IGreeter {
      greet&lt;T extends Animal&gt;(): T {
          return new Dog();
      }
  }
  
  var dog = new Greeter().greet&lt;Dog&gt;();
  dog.name = "Poochie";
  </code></pre>
  
  <p>The code above does not compile because of the error stated below. But I don't find the root cause of the error from the message, I suspect is something related to the spec, but the error message is not helpful and I can't find the response in the spec documents.</p>
  
  <p>Here is the error that I get for the Greeter class:</p>
  
  <pre><code>Class Greeter declares interface IGreeter but does not implement it:
  Types of property 'greet' of types 'Greeter' and 'IGreeter' are incompatible:
  Call signatures of types '&lt;T extends Animal&gt;() =&gt; T' and
                           '&lt;T extends Animal&gt;() =&gt; T' are incompatible.
  </code></pre>
  
  <p>Finally, this code is a simplified version of a complex structure I have on a larger solution, the code worked on TypeScript 0.9.1.1 but broke after upgrading to 0.9.5.</p>
  
  <p><a href="http://www.typescriptlang.org/Playground/#src=class%20Animal%20%7B%0A%7D%0A%0Aclass%20Dog%20extends%20Animal%20%7B%0A%09name%3a%20string;%0A%7D%0A%0Ainterface%20IGreeter%20%7B%0A%09greet%3CT%20extends%20Animal%3E%28%29%3a%20T;%0A%7D%0A%0Aclass%20Greeter%20implements%20IGreeter%20%7B%0A%09greet%3CT%20extends%20Animal%3E%28%29%3a%20T%20%7B%0A%09%09return%20new%20Dog%28%29;%0A%09%7D%0A%7D%0A%0Avar%20dog%20=%20new%20Greeter%28%29.greet%3CDog%3E%28%29;%0Adog.name%20=%20%22Poochie%22;" rel="nofollow">Here is the live version with the error on the TypeScript playground</a></p>
  
  <p><a href="http://www.typescriptlang.org/Content/TypeScript%20Language%20Specification.pdf" rel="nofollow">Here is the 0.9.5 spec</a></p>
  
  <p>Finally I found a way to make it somehow-work, replacing T by Animal in the interface declaration, but I can't find why this implementation is wrong.</p>