[interp] Fall back to old implementation when calling on proxy
[mono-project.git] / mcs / tests / test-debug-11.cs
blob1f01bdd784acfd574c9fedc7cd9e74826dbbe414
1 using System;
2 using System.Collections;
3 using System.Collections.Generic;
5 struct S : IDisposable, IEnumerable
7 public void Dispose ()
11 public IEnumerator GetEnumerator ()
13 return new List<int>().GetEnumerator ();
17 class C
19 public static void Main ()
23 void Using_1 ()
25 using (var s = new S ())
30 void Using_2 ()
32 using (S s = new S (), s2 = new S ())
37 void Using_3 ()
39 using (S? s = new S ())
44 void Using_4 ()
46 using (var ms = new System.IO.MemoryStream ())
48 Console.WriteLine ("a");
52 void Lock ()
54 lock (this)
59 void Lock_2 ()
61 lock (this)
63 return;
67 void Switch_1 (int arg)
69 switch (arg)
71 case 1:
72 break;
73 case 2:
75 break;
77 case 3:
78 goto case 2;
79 case 4:
80 case 5:
81 break;
82 default:
83 break;
87 void Switch_2 (int? arg)
89 switch (arg)
91 case 1:
92 break;
93 case 2:
95 break;
97 default:
98 break;
102 void Switch_3 (string s)
104 switch (s)
106 case "a":
107 break;
108 case "b":
110 break;
112 case "c":
113 case "e":
114 goto case "a";
115 case "f":
116 break;
117 case "gggg":
118 case "hhh":
119 case "iii":
120 break;
121 default:
122 break;
126 void Switch_4 (string s)
128 switch (s)
130 case "a":
131 break;
132 case "b":
133 break;
134 default:
135 break;
139 void Checked ()
141 checked
143 int a = 1;
146 unchecked
148 int a = 2;
152 void DoWhile (int arg)
157 while (arg != 0);
159 while (arg > 0)
164 void DoWhile_2 ()
168 int i = 2;
170 while (true);
173 void While_2 ()
175 while (true)
177 Console.WriteLine ("aa");
181 void If (string s)
183 if (s == "a")
186 else
191 void If_2 (string s)
193 if (s == "a")
196 else if (s == "b")
199 else
204 void If_3 (int i)
206 if (i == i)
209 else
214 void For_1 ()
216 for (int i = 0;
217 i < 4;
218 ++i)
222 for (;
229 void For_2 ()
231 for (int i = 0; ;)
236 void ForEach (int[] args)
238 foreach (
239 var a
240 in args)
245 void ForEach_2 (List<object> args)
247 foreach
248 (var a
250 args)
255 void ForEach_3 (S args)
257 foreach
258 (var a
260 args)
265 void ForEach_4 (int[,] args)
267 foreach (
268 var a
269 in args)