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 'mono/mini/objects.cs')
-rw-r--r--mono/mini/objects.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/mono/mini/objects.cs b/mono/mini/objects.cs
index 3aa8a24aaf4..9cbbcd28f54 100644
--- a/mono/mini/objects.cs
+++ b/mono/mini/objects.cs
@@ -876,6 +876,23 @@ class Tests {
return 2;
}
+ class InstanceDelegateTest {
+ public int a;
+
+ public int return_field () {
+ return a;
+ }
+ }
+
+ public static int test_2_instance_delegate_with_field () {
+ InstanceDelegateTest t = new InstanceDelegateTest () { a = 1337 };
+ GetIntDel del = new GetIntDel (t.return_field);
+ int v = del ();
+ if (v != 1337)
+ return 0;
+ return 2;
+ }
+
interface IFaceVirtualDel {
int return_field ();
}