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-21 19:01:19 +0400
committerMarek Safar <marek.safar@gmail.com>2010-10-21 19:07:48 +0400
commit46dd735d7fe6532867683ecedd65fbda375c2306 (patch)
tree0605cc853acb38b8dd6e27f758384bb0b81b5f61 /mcs/tests/dtest-042.cs
parent30f3fd3434ceb7b81d0259ecd1d37071458f4c34 (diff)
Implement closest override return type matching
Diffstat (limited to 'mcs/tests/dtest-042.cs')
-rw-r--r--mcs/tests/dtest-042.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/mcs/tests/dtest-042.cs b/mcs/tests/dtest-042.cs
new file mode 100644
index 00000000000..c78f9cfcfc1
--- /dev/null
+++ b/mcs/tests/dtest-042.cs
@@ -0,0 +1,26 @@
+class A
+{
+ protected virtual object Prop { get { return null; } set { } }
+}
+
+class B : A
+{
+ public void Foo ()
+ {
+ }
+
+ protected override dynamic Prop { get { return new B (); } }
+}
+
+class Program : B
+{
+ void Test ()
+ {
+ base.Prop.Foo ();
+ }
+
+ public static void Main ()
+ {
+ new Program ().Test ();
+ }
+} \ No newline at end of file