title: A value of type 'num' can't be assigned to a variable of type 'T'
body: <p>hello when i use this generic method i get this error</p>
  <blockquote>
  <p>A value of type 'num' can't be assigned to a variable of type 'T'. Try changing the type of the variable, or casting the right-hand type to 'T'.</p>
  </blockquote>
  <p>what the error here</p>
  <pre class="lang-dart prettyprint-override"><code>sums&lt;T extends num&gt;(List&lt;T&gt; list) {
    T res =list[0];
    for (var i = 1; i &lt; list.length; i++) {
     res = res + list[i];
    }
    print(res);
  }
  </code></pre>