diff --git a/ICSharpCode.Decompiler/Tests/Async.cs b/ICSharpCode.Decompiler/Tests/Async.cs index da9b520e4..b7eae6748 100644 --- a/ICSharpCode.Decompiler/Tests/Async.cs +++ b/ICSharpCode.Decompiler/Tests/Async.cs @@ -56,6 +56,25 @@ public class Async return true; } + public async void TwoAwaitsWithDifferentAwaiterTypes() + { + Console.WriteLine("Before"); + if (await SimpleBoolTaskMethod()) { + await Task.Delay(TimeSpan.FromSeconds(1.0)); + } + Console.WriteLine("After"); + } + + public async void StreamCopyTo(Stream destination, int bufferSize) + { + byte[] array = new byte[bufferSize]; + int count; + while ((count = await destination.ReadAsync(array, 0, array.Length)) != 0) + { + await destination.WriteAsync(array, 0, count); + } + } + public async void AwaitInLoopCondition() { while (await SimpleBoolTaskMethod()) { @@ -82,4 +101,9 @@ public class Async Console.WriteLine("Crash"); } } + + public async Task NestedAwait(Task> task) + { + return await(await task); + } } diff --git a/ILSpy/Properties/AssemblyInfo.template.cs b/ILSpy/Properties/AssemblyInfo.template.cs index 247f8e857..3a392ca5a 100644 --- a/ILSpy/Properties/AssemblyInfo.template.cs +++ b/ILSpy/Properties/AssemblyInfo.template.cs @@ -32,7 +32,7 @@ using System.Runtime.InteropServices; internal static class RevisionClass { public const string Major = "2"; - public const string Minor = "0"; + public const string Minor = "1"; public const string Build = "0"; public const string Revision = "$INSERTREVISION$"; public const string VersionName = null;