Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-469171: ValueTuple and await : Unexpected error message "Cannot resolve symbol 'await'"

$
0
0
Reporter Maria Pleskunina (Maria.Pleskunina) Maria Pleskunina (Maria.Pleskunina)
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);
}
}

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>