[ilasm] Don't break arguments compatiblity
[mono-project.git] / mcs / tests / test-anon-158.cs
blobe726353a8542e0b290d428becfbc82f1f01f4ea3
1 // Compiler options: -r:test-anon-158-lib.dll
3 using System;
5 public class Test
7 public X Foo<X> (bool b)
9 Call<X> foo = new Call<X> ();
10 if (b) {
11 Func<X> f = () => foo.Field;
12 return f ();
15 throw null;
18 public X FooNested<X> (bool b)
20 Call<Call<X>> foo = new Call<Call<X>> ();
21 foo.Field = new Call<X> ();
22 if (b) {
23 Func<Call<X>> f = () => foo.Field;
24 return f ().Field;
27 throw null;
30 public static int Main ()
32 var v = new Test ();
33 if (v.Foo<int>(true) != 0)
34 return 1;
36 if (v.FooNested<int>(true) != 0)
37 return 2;
39 return 0;