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-13 12:07:08 +0400
committerMarek Safar <marek.safar@gmail.com>2010-10-13 18:57:12 +0400
commit3b2b574dd37ed7fafd36750102cca45a2c697973 (patch)
tree9744984529350dbbe585e6a95a020a8b9c67fbd1 /mcs/tests/dtest-011.cs
parent9816af42ffe709dcae6471a35dc6955568f472c0 (diff)
Dynamic type is never better than other types in overload resolution
Diffstat (limited to 'mcs/tests/dtest-011.cs')
-rw-r--r--mcs/tests/dtest-011.cs17
1 files changed, 16 insertions, 1 deletions
diff --git a/mcs/tests/dtest-011.cs b/mcs/tests/dtest-011.cs
index 2b72f4facf9..39e78ead2d1 100644
--- a/mcs/tests/dtest-011.cs
+++ b/mcs/tests/dtest-011.cs
@@ -16,6 +16,16 @@ class C
{
Console.WriteLine ("Got static long: {0}", l);
}
+
+ static int MethodBest (short d)
+ {
+ return 1;
+ }
+
+ static int MethodBest (dynamic d)
+ {
+ return -1;
+ }
void test ()
{
@@ -24,8 +34,13 @@ class C
foo_static (d);
}
- static void Main ()
+ static int Main ()
{
new C ().test ();
+
+ if (MethodBest (1) != 1)
+ return 1;
+
+ return 0;
}
}