X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Ftests%2Fgtest-anon-24.cs;h=103ba8d0537fc87baa348a1b8927e296b203322f;hb=2d23bfcbce7a3f7e54dcd5911adb88b244baca35;hp=8c97345554f85b719cde1149a20e0b2572da7504;hpb=c29282519b48d5fbfd73dd2bd1306a7844174f29;p=mono.git diff --git a/mcs/tests/gtest-anon-24.cs b/mcs/tests/gtest-anon-24.cs index 8c97345554f..103ba8d0537 100644 --- a/mcs/tests/gtest-anon-24.cs +++ b/mcs/tests/gtest-anon-24.cs @@ -14,6 +14,15 @@ interface IFoo { } +class CA +{ + public struct Nested + { + public static readonly T Value; + public readonly T Value2; + } +} + class Test { static Func For (List list) @@ -153,6 +162,14 @@ class Test }; } + static Func NestedTypeMutate () + { + var local = new CA.Nested (); + return () => { + return new [] { CA.Nested.Value, local.Value2 }; + }; + } + public static int Main () { if (For (new List { 5, 10 })() [1] != 10) @@ -201,6 +218,10 @@ class Test var t11 = TypeOf ("b"); if (t11 () != typeof (string)) return 11; + + var t12 = NestedTypeMutate ()(); + if (t12 [0] != 0 || t12 [1] != 0) + return 12; Console.WriteLine ("OK"); return 0;