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:
Diffstat (limited to 'mcs/tests/test-283.cs')
-rw-r--r--mcs/tests/test-283.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/mcs/tests/test-283.cs b/mcs/tests/test-283.cs
new file mode 100644
index 00000000000..f4b0bc8d06f
--- /dev/null
+++ b/mcs/tests/test-283.cs
@@ -0,0 +1,33 @@
+class X {
+ public virtual int Foo () {
+ return 1;
+ }
+}
+
+class Y : X {
+
+ delegate int D();
+
+
+ D GetIt () {
+ return new D (base.Foo);
+ }
+
+ D GetIt2 () {
+ return base.Foo;
+ }
+
+ public override int Foo () {
+ return 0;
+ }
+
+ static int Main ()
+ {
+ if (new Y ().GetIt () () == 1 && new Y ().GetIt2 () () == 1) {
+ System.Console.WriteLine ("good");
+ return 0;
+ }
+
+ return 1;
+ }
+} \ No newline at end of file