NRefactory icon indicating copy to clipboard operation
NRefactory copied to clipboard

Auto-Async issue failing on Windows

Open luiscubal opened this issue 12 years ago • 0 comments

I've noticed https://github.com/icsharpcode/NRefactory/commit/813fe1d54bffa0cde66c1ea4acb8e81425072394 and I decided to investigate this problem. I've focused on TestContinueWithUsingPrecedentTask.

After some debugging, I believe this problem is caused by two bugs:

  1. The original AutoAsyncIssue has insufficient testing and fails for Tasks with no parameters that happen to be reused. I've added the missing test case and it also fails on Linux. See https://github.com/luiscubal/NRefactory/commit/0f48a9788333a8e1289604fdaee9d264423b10f6
  2. The resolver behaves differently on Windows. The lambda parameter in the continuation (precedent) resolves to Task<int>(correctly) on Linux but Task (incorrectly) on Windows. This triggered the untested code path for Tasks with no parameters on Windows.

This is all I've got for today. I'll take another look and try to fix 1 when I have some more time, but I'll have to rely on someone else to figure out the cause of problem 2. Should I start a separate issue for that one?

luiscubal avatar Nov 11 '13 23:11 luiscubal