Merge pull request #2774 from marek-safar/roslyn
[mono.git] / mcs / tests / gtest-380.cs
index 00d7e3bd45d84986217de923330e35025fe1a05a..8e27fa894f51bb9e0f73d15da6c212ee962f431d 100644 (file)
@@ -1,6 +1,11 @@
 using System.Reflection;
 using System;
 
+class GTest<T>
+{
+       public static volatile string str = "Hello";
+}
+
 class Test
 {
        public volatile int field;
@@ -17,7 +22,18 @@ class Test
                
                if (t [0] != typeof (System.Runtime.CompilerServices.IsVolatile))
                        return 3;
+
+               fi = typeof (GTest<>).GetField ("str");
+               if (fi.GetCustomAttributes (true).Length != 0)
+                       return 10;
                
+               t = fi.GetRequiredCustomModifiers ();
+               if (t.Length != 1)
+                       return 11;
+               
+               if (t [0] != typeof (System.Runtime.CompilerServices.IsVolatile))
+                       return 12;
+
                Console.WriteLine ("OK");
                return 0;
        }