title: Why async / await allows for implicit conversion from a List to IEnumerable?
body: <p>I've just been playing around with async/await and found out something interesting. Take a look at the examples below:</p>
  
  <pre><code>// 1) ok - obvious
  public Task&lt;IEnumerable&lt;DoctorDto&gt;&gt; GetAll()
  {
      IEnumerable&lt;DoctorDto&gt; doctors = new List&lt;DoctorDto&gt;
      {
          new DoctorDto()
      };
  
      return Task.FromResult(doctors);
  }
  
  // 2) ok - obvious
  public async Task&lt;IEnumerable&lt;DoctorDto&gt;&gt; GetAll()
  {
      IEnumerable&lt;DoctorDto&gt; doctors = new List&lt;DoctorDto&gt;
      {
          new DoctorDto()
      };
  
      return await Task.FromResult(doctors);
  }
  
  // 3) ok - not so obvious
  public async Task&lt;IEnumerable&lt;DoctorDto&gt;&gt; GetAll()
  {
      List&lt;DoctorDto&gt; doctors = new List&lt;DoctorDto&gt;
      {
          new DoctorDto()
      };
  
      return await Task.FromResult(doctors);
  }
  
  // 4) !! failed to build !!
  public Task&lt;IEnumerable&lt;DoctorDto&gt;&gt; GetAll()
  {
      List&lt;DoctorDto&gt; doctors = new List&lt;DoctorDto&gt;
      {
          new DoctorDto()
      };
  
      return Task.FromResult(doctors);
  }
  </code></pre>
  
  <p>Consider cases 3 and 4. The only difference is that 3 uses async/await keywords. 3 builds fine, however 4 gives an error about implicit conversion of a List to IEnumerable:</p>
  
  <pre><code>Cannot implicitly convert type 
  'System.Threading.Tasks.Task&lt;System.Collections.Generic.List&lt;EstomedRegistration.Business.ApiCommunication.DoctorDto&gt;&gt;' to 
  'System.Threading.Tasks.Task&lt;System.Collections.Generic.IEnumerable&lt;EstomedRegistration.Business.ApiCommunication.DoctorDto&gt;&gt;'  
  </code></pre>
  
  <p>What is it that async/await keywords change here?</p>