Reporter |
|
---|---|
Created | Apr 9, 2018 7:12:07 PM |
Updated | Apr 10, 2018 8:41:03 PM |
Subsystem | Code Analysis - C# |
Assignee | Ivan Serduk (IvanSerduk) |
Priority | Critical |
State | Fixed In Branch |
Type | Bug |
Fix version | No Fix versions |
Affected versions | 2017.3.5, 2018.1 |
Fixed In Version ReSharper | Undefined |
VsVersion | All Versions |
A wrong error message is displayed when using an await keyword with a task variable inside a value tuple. Please find below a code to repro the issue.
public class Program
{
public static async Task Main(string[] args)
{
// This is working fine
var (result1, result2) = (await ComputeResult(), await ComputeResult());
// This display an error: "Cannot resolve symbol 'await'" while it should not
Task<bool> computeResultTask1 = ComputeResult();
var (result3, result4) = (await computeResultTask1, await ComputeResult());
}
private static Task<bool> ComputeResult()
{
return Task.FromResult(true);
}
}