Merge pull request #4998 from kumpera/fix_56684
[mono.git] / mcs / tests / gtest-named-03.cs
index 144a33bf2c454249cbfc4c3666bb9b9a0e4ef581..d363e9a079508272700e025aecfba8ce1643506b 100644 (file)
@@ -6,6 +6,16 @@ public class C
        {
                return a;
        }
+       
+       int v;
+       int this [int a, int b = 1, int c = 2] {
+               set {
+                       v = a * 500 + b * 50 + c;
+               }
+               get {
+                       return v;
+               }
+       }
 
        public static int Main ()
        {
@@ -14,7 +24,13 @@ public class C
 
                if (Foo (a: 10) != 10)
                        return 2;
-
+               
+               C c = new C ();
+               c [a : 1, c : 2, b : 3] = 1;
+               var res = c [1];
+               if (res != 652)
+                       return 3;
+               
                return 0;
        }
 }