Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2010-10-18 19:30:32 +0400
committerMarek Safar <marek.safar@gmail.com>2010-10-18 19:40:27 +0400
commit8a80ce76461ae2ca2b3423996f487b40cd41c8c5 (patch)
tree417163d013fddba732cae0d506b7a1d4120774bd /mcs/tests/gtest-named-03.cs
parent2bb017f21c7f34d5705f2606aaf4498dc6648e31 (diff)
[512754] Overload resolution with named or optional arguments has to use closest member parameters
Diffstat (limited to 'mcs/tests/gtest-named-03.cs')
-rw-r--r--mcs/tests/gtest-named-03.cs18
1 files changed, 17 insertions, 1 deletions
diff --git a/mcs/tests/gtest-named-03.cs b/mcs/tests/gtest-named-03.cs
index 144a33bf2c4..d363e9a0795 100644
--- a/mcs/tests/gtest-named-03.cs
+++ b/mcs/tests/gtest-named-03.cs
@@ -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;
}
}