2 using System
.Threading
.Tasks
;
5 public enum someEnum2
{
10 private static GenericEnumTest
<someEnum2
> test1
= new GenericEnumTest
<someEnum2
>();
11 public static async Task
<int> Main(string[] args
)
13 int retVal
= await test1
.ThrowExceptionWithGeneric(someEnum2
.aaa
);
18 public class GenericEnumTest
<T
> where T
: struct {
24 public async Task
<int> ThrowExceptionWithGeneric(T val
) {
26 await ThrowExceptionTaskReturn(val
);
27 } catch (Exception e
) {
33 public async Task
<anEnum
> ThrowExceptionTaskReturn(T val
) {
34 for (int i
= 0; i
< 3; i
++) {
35 Console
.WriteLine("[ASY] " + (3 - i
) + " " + System
.Threading
.Thread
.CurrentThread
.ManagedThreadId
);
36 await Task
.Delay(TimeSpan
.FromSeconds(1));
39 var nulla
= default(string[]);
40 // Causes exception to fire, walking the stack trace causes nullpointer exception bug