[interp] Fall back to old implementation when calling on proxy
[mono-project.git] / mcs / tests / test-763.cs
blobbdb03a8a337f99f0c7739f9d2562725f1e270306
1 using System;
3 public class StaticDelegateWithSameNameAsInstance
5 private Provider _provider;
6 delegate void Provider (string s);
8 Provider MyProvider
10 set
12 _provider = value;
13 if (_provider != null) {
14 _provider ("v");
19 static int i = 1;
21 public void StaticCallback ()
23 i += 7;
24 MyProvider = StaticCallback;
27 public static void StaticCallback (string s)
29 if (s != "v")
30 throw new ApplicationException ();
32 i *= 3;
35 public static int Main ()
37 new StaticDelegateWithSameNameAsInstance ().StaticCallback ();
39 Console.WriteLine (i);
40 if (i != 24)
41 return 1;
43 return 0;