diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Resolver/LambdaTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Resolver/LambdaTests.cs index 97c7f73a2..efaf5e535 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Resolver/LambdaTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Resolver/LambdaTests.cs @@ -77,6 +77,26 @@ public SomeClass(Action ac) { } var lrr = Resolve(program); Assert.AreEqual("System.String", lrr.Type.ReflectionName); } + + [Test] + public void LambdaTaskParameterTest() + { + string program = @"using System.Threading.Tasks; + +class TestClass { + public void TestMethod () { + Task foo = null; + foo.ContinueWith($precedent => { + Console.WriteLine (precedent.IsFaulted); + }$); + } +}"; + + var lambdaResolveResult = Resolve(program); + + //Precedent must be of type Task, not just Task + Assert.IsTrue(lambdaResolveResult.Parameters[0].Type.IsParameterized); + } #region Lambda In Array Initializer [Test]