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-08-03 15:49:45 +0400
committerMarek Safar <marek.safar@gmail.com>2010-08-03 15:49:45 +0400
commitb9ba213889ae5f13a4abfb74eec24b0b70443e80 (patch)
treef79bb53469d633f7a33d7214db88ca144a0be63e /mcs/tests/dtest-016.cs
parent983f0c3402c4ce45e843ea6907de1abc62ebe5b4 (diff)
Fixed equality match between object and dynamic for ref/out parameters.
Diffstat (limited to 'mcs/tests/dtest-016.cs')
-rw-r--r--mcs/tests/dtest-016.cs40
1 files changed, 40 insertions, 0 deletions
diff --git a/mcs/tests/dtest-016.cs b/mcs/tests/dtest-016.cs
new file mode 100644
index 00000000000..a9bac7ee28a
--- /dev/null
+++ b/mcs/tests/dtest-016.cs
@@ -0,0 +1,40 @@
+using System;
+
+class Foo
+{
+ public virtual void Dyn (out dynamic o)
+ {
+ o = null;
+ }
+}
+
+class Bar : Foo
+{
+ public override void Dyn (out dynamic o)
+ {
+ base.Dyn (out o);
+ }
+}
+
+class Program
+{
+ static void DynOut (out dynamic d)
+ {
+ d = null;
+ }
+
+ static void DynRef (ref object d)
+ {
+ d = null;
+ }
+
+ static int Main ()
+ {
+ object o;
+ DynOut (out o);
+
+ dynamic d = null;
+ DynRef (ref d);
+ return 0;
+ }
+}