Created
October 8, 2018 05:04
-
-
Save scionwest/c11579fabb84889e04beed6a29454769 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using System.Threading.Tasks; | |
namespace FuncContravarianceIssue | |
{ | |
[TestClass] | |
public class UnitTest1 | |
{ | |
private class Foo | |
{ | |
} | |
[TestMethod] | |
public async Task TestMethod1() | |
{ | |
var data = new Foo(); | |
Task continuationCallback(Task input, Foo state) | |
{ | |
return Task.CompletedTask; | |
} | |
await Task.Delay(1).ContinueWith<Task>( | |
continuationFunction: continuationCallback, | |
state: data); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment