title: Why sub type is not assignable to <T extends baseclass> generics in Dart
body: <p>Why I can't assign <code>Future&lt;T&gt; fut = Future.value(Student())</code> where as <code>Future&lt;User&gt; fut = Future.value(Student())</code> is possible.</p>
  <pre class="lang-dart prettyprint-override"><code>void main() {}
  
  class Test&lt;T extends User&gt; {   // &lt;----- T extends User (which is base class for Student &amp; Teacher)
    Future&lt;T&gt; fut = Future.value(Student());  // &lt;----- Compiler error
    Future&lt;User&gt; fut2 = Future.value(Student());  // &lt;----- works fine
  }
  
  class User {}
  
  class Teacher extends User {}
  
  class Student extends User {}
  
  </code></pre>