Bump NuGet.BuildTasks to get new updates and switch to `dev` branch (#5566)
[mono.git] / mcs / tests / test-498.cs
index 64c67d7c37f9507d8fab836a7049c2d5d0769e70..2615f61d83fe755579ca2c6dc8db079d3c39ab9e 100644 (file)
@@ -1,17 +1,29 @@
-using System.Reflection;\r
-using System.Runtime.CompilerServices;\r
-\r
-struct C\r
-{\r
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+struct A
+{
        [MethodImplAttribute(MethodImplOptions.InternalCall)]
-       public extern C(float value);
-\r
-       static int Main ()\r
-       {\r
-               MethodImplAttributes iflags = typeof (C).GetConstructors()[0].GetMethodImplementationFlags ();\r
-               if ((iflags & MethodImplAttributes.InternalCall) == 0)\r
-                       return 1;\r
-\r
-               return 0;\r
-       }\r
+       public extern A (float value);
+       
+       public extern int Foo {
+               [MethodImplAttribute(MethodImplOptions.InternalCall)]
+               get;
+       }
+}
+
+struct C
+{
+       public static int Main ()
+       {
+               MethodImplAttributes iflags = typeof (A).GetConstructors()[0].GetMethodImplementationFlags ();
+               if ((iflags & MethodImplAttributes.InternalCall) == 0)
+                       return 1;
+
+               iflags = typeof (A).GetProperties ()[0].GetGetMethod ().GetMethodImplementationFlags ();
+               if ((iflags & MethodImplAttributes.InternalCall) == 0)
+                       return 2;
+               
+               return 0;
+       }
 }