Reporter | Vladimir Reshetnikov (nikov) |
---|---|
Created | Apr 15, 2012 12:08:10 AM |
Updated | Apr 15, 2012 12:08:10 AM |
Priority | Normal |
Type | Bug |
Fix versions | No Fix versions |
State | Submitted |
Assignee | Unassigned |
Subsystem | No subsystem |
Affected versions | No Affected versions |
Fixed in build | No Fixed in build |
using System.Collections; using System.Threading.Tasks; class A { async void Foo() { IEnumerable x = await {caret} // Smart completion } private Task<string> Bar() { throw new System.NotImplementedException(); } }
Actual:
using System.Collections; using System.Threading.Tasks; class A { async void Foo() { IEnumerable x = await MemberwiseClone() // error CS4001: Cannot await 'object' } private Task<string> Bar() { throw new System.NotImplementedException(); } }
Expected:
using System.Collections; using System.Threading.Tasks; class A { async void Foo() { IEnumerable x = await Bar() // OK } private Task<string> Bar() { throw new System.NotImplementedException(); } }